Rails - rake db:create error

后端 未结 1 1660
無奈伤痛
無奈伤痛 2021-01-24 10:45

Im trying to run rake db:create for a mysql database but getting the error

$ rake db:create
rake aborted!
undefined method `task\' for #

        
相关标签:
1条回答
  • 2021-01-24 11:42

    You should precise your version of rake in your GemFile.

    Rake 0.9 just got out but break Rails.

    here's the tweet of dhh:

    Rake 0.9,released yesterday, broke Rails (and others). While we wait for a fix, you'll want gem 'rake', '0.8.7' in your Gemfile.

    Try that?

    EDIT: Also, see that post if you REALLY need Rake 0.9 rather than Rake 0.8.7. Maybe that kind of fix would work for you.

    0 讨论(0)
提交回复
热议问题