windows下ruby on rails 数据迁移报错rake aborted! uninitialized constant Rake::DSL_Ruby_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > Ruby > windows下ruby on rails 数据迁移报错rake aborted! uninitialized constant Rake::DSL

windows下ruby on rails 数据迁移报错rake aborted! uninitialized constant Rake::DSL

 2011/8/10 17:30:12  zzhattzzh  http://zzhattzzh.iteye.com  我要评论(0)
  • 摘要:window下配置完ruby1.9.2和rails3.09之后进行数据迁移报错:C:\Users\jia\webapps>rakedb:create(inC:/Users/jia/webapps)rakeaborted!uninitializedconstantRake::DSLC:/Ruby192/lib/ruby/1.9.1/rake.rb:2482:in`const_missing'C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9
  • 标签:Windows rails Ruby windows下 数据 迁移 Ant
window下配置完ruby1.9.2和rails3.09之后进行数据迁移报错:
C:\Users\jia\webapps>rake db:create
(in C:/Users/jia/webapps)
rake aborted!
uninitialized constant Rake::DSL
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in `<class:
TaskLib>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in `<module
:Rake>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in `<top (r
equired)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `<top (requi
red)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation
.rake:2:in `require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation
.rake:2:in `<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in `loa
d'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in `blo
ck in <top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `each
'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `<top
 (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:
in `require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:
in `initialize_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:139:
in `load_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:77:i
n `method_missing'
C:/Users/jia/webapps/Rakefile:7:in `<top (required)>'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `load'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in `run'
C:/Ruby192/bin/rake:31:in `<main>'

在网上查了一下找到了解决方法
在命令喊执行:
gem install rake

C:\Users\jia\webapps>gem install rake
Successfully installed rake-0.9.2
1 gem installed
Installing ri documentation for rake-0.9.2...
Installing RDoc documentation for rake-0.9.2...

之后再重新创建一个rails app 就ok了
发表评论
用户名: 匿名