Ruby on Rails , No Rakefile found error

前端 未结 3 1757
走了就别回头了
走了就别回头了 2021-02-20 08:52

I installed ruby on rails, postgres. I installed all required gem files, I created a project as http://guides.rubyonrails.org/getting_started.html wants

I added below co

相关标签:
3条回答
  • 2021-02-20 09:29

    I don't know why but this worked for me. worth a try

    heroku rake db:migrate 
    

    Found it on this discussion

    0 讨论(0)
  • 2021-02-20 09:32

    I was having the same problem, and spent ages trying different commands, replacing rakefiles etc.

    Turned out I was not in the app's root directory within the Command Prompt. :(

    0 讨论(0)
  • 2021-02-20 09:41

    Sounds like your Rakefile might be missing, or you might not be in the app's "root directory".

    cd to your blog directory, and you should see,

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

    If it doesn't exist already, create a new file named Rakefile and put this text in there.

    #!/usr/bin/env rake
    # 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 讨论(0)
提交回复
热议问题