2012-09-19 95 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 ...