2012-09-19 46 views
0

我不得不创建一个成功的脚手架一个空的新的Rails项目,但是当我尝试rake db:create,它将引发我一个错误:rake aborted! uninitialized constant Rake::DSL耙中止对Rails 3.2.8

至于其他SO帖子中提到的,我想我的Gemfile设定为宝石“耙”,“0.8.7”,但耙给了我另一个错误:

You have requested: rake = 0.8.7

The bundle currently has rake locked at 0.9.2.2. Try running bundle update rake Run bundle install to install missing gems.

然后我做的留言说和更新耙和捆绑安装。同样的错误。

它是好的,易于经验,开发项目中的轨道,但它是一个噩梦红宝石版本之间移植,导轨版本,区别宝石和插件的版本..

回答

1

尝试删除您Gemfile.lock的,和类型这是你的终端上:

bundle install 
0

I had create a empty new rails project with a scaffold successfully but when I try rake db:create, it throws me an error: rake aborted! uninitialized constant Rake::DSL.

对于这个问题我建议你运行的所有Rake任务通过bundle exec rake ...