开发者

rake db:create - rake aborted - no rakefile found

So, the titl开发者_高级运维e is quite self explanatory, but here's the following ..

rake db:create
rake aborted!
No rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

Any help would be appreciated.


What is your current working directory when calling the rake db:create command? Are you in the root of the Rails app?


You have to be in the root of the Rails app that you are creating. Currently you must be one step up.


Case I:

Check out your directory. If you are in same directory where your application is available then you wont' get is this message. You are getting this message because you are out of your application directory. To check you present directory you can use this command

pwd

Case II

You might missing your Rakefile. Check it out in your directory. For example,

$ ls
  app/
  bin/
  config/
  db/
  ...

If you don't find Rakefile then create new one. Puts this code

# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

Blog::Application.load_tasks
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜