运行 "rails s" 导致帮助页面被打印出来

Running "rails s" causes help page to be printed out

我以前从未见过这种奇怪的问题。我在 EC2 实例上有一个 Rails 4.2.5 应用程序。 Ruby版本是2.3.1。

所有捆绑和安装都很好,但是当我 运行 rails s 时,我最终得到了其他标志的手册页以提供给 rails

直接从航站楼:

$ rails s
bin/rails:6: warning: already initialized constant APP_PATH
/home/ubuntu/githubstars/bin/rails:6: warning: previous definition of APP_PATH was here
Usage: rails COMMAND [ARGS]

The most common rails commands are:
 generate    Generate new code (short-cut alias: "g")
 console     Start the Rails console (short-cut alias: "c")
 server      Start the Rails server (short-cut alias: "s")
 dbconsole   Start a console for the database specified in config/database.yml
             (short-cut alias: "db")
 new         Create a new Rails application. "rails new my_app" creates a
             new application called MyApp in "./my_app"

In addition to those, there are:
 destroy      Undo code generated with "generate" (short-cut alias: "d")
 plugin new   Generates skeleton for developing a Rails plugin
 runner       Run a piece of code in the application environment (short-cut alias: "r")

All commands can be run with -h (or --help) for more information.

$ rails -v
Rails 4.2.5

$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

您缺少 bin 目录。在某处生成一个新项目,将bin文件夹复制过来。