Error // Usage: rails new APP_PATH [options] // when running 'rails server'

后端 未结 5 1341
醉话见心
醉话见心 2021-01-13 09:48

Background info:

I\'m using GIT to get a repository of a project with Ruby files in it. The project lives in my SITES folder under home directory on my Mac.

相关标签:
5条回答
  • 2021-01-13 10:16

    You're running rails server from the wrong directory. Go INTO the directory containing your app and run the command from there. For example, if you ran rails new thingy, you must be in the thingy directory when you use rails server.

    0 讨论(0)
  • 2021-01-13 10:17

    Your folder director should be in Gemfile,

    0 讨论(0)
  • 2021-01-13 10:20

    Other issue could be:

    You must have deleted bin folder from root directory or some files in it. please recover it back and all will work normally.

    0 讨论(0)
  • 2021-01-13 10:28

    Usually if you clone a repository or if you are using Docker, files like .gitignore or .dockerignore has instructions for doesn't include bin folder, check in both files and simply remove the line with it.

    You can execute rails new in another directory and copy the generated bin folder to your project and then push to your repository.

    0 讨论(0)
  • 2021-01-13 10:32

    I got this when upgrading from rails 2 to rails 3 also. Then I ran rails new . to replace all the necessary files and it worked after that.

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