当我在Rails(5.1.6)项目根文件夹中运行bin/rails generate --help
时,它向我显示了rackup命令的帮助:
bin/rails generate --help [±internal/better-admin ●●]
Usage: rackup [ruby options] [rack options] [rackup config]
Ruby options:
-e, --eval LINE evaluate a LINE of code
-b BUILDER_LINE, evaluate a BUILDER_LINE of code as a builder script
--builder
-d, --debug set debugging flags (set $DEBUG to true)
-w, --warn turn warnings on for your script
-q, --quiet turn off logging
-I, --include PATH specify $LOAD_PATH (may be used more than once)
-r, --require LIBRARY require the library, before executing your script
Rack options:
-s, --server SERVER serve using SERVER (thin/puma/webrick/mongrel)
-o, --host HOST listen on HOST (default: localhost)
-p, --port PORT use PORT (default: 9292)
-O NAME[=VALUE], pass VALUE to the server as option NAME. If no VALUE, sets it to true. Run 'bin/rails -s SERVER -h' to get a list of options for SERVER
--option
-E, --env ENVIRONMENT use ENVIRONMENT for defaults (default: development)
-D, --daemonize run daemonized in the background
-P, --pid FILE file to store PID
Common options:
-h, -?, --help Show this message
--version Show version
Server-specific options for Rack::Handler::Puma:
-O Threads=MIN:MAX min:max threads to use (default 0:16)
-O Verbose Don't report each request (default: false)
bin/rails generate
本身可以正常工作,但是每个使用修饰符的generate命令似乎都重定向到了rackup命令。因此,例如bin/rails generate GENERATOR --anyoption
向我展示了这一点:
invalid option: --anyoption
Usage: rackup [ruby options] [rack options] [rackup config]
...
有人遇到过吗?我已经尝试禁用spring,但是得到相同的结果。