Skip to content

Instantly share code, notes, and snippets.

@lanrion
Created June 22, 2014 05:11
Show Gist options
  • Save lanrion/6fd390d6e1d216eef2c3 to your computer and use it in GitHub Desktop.
Save lanrion/6fd390d6e1d216eef2c3 to your computer and use it in GitHub Desktop.
bin/rails:6: warning: already initialized constant APP_PATH
lanrion dummy (master) $ 4rs 
bin/rails:6: warning: already initialized constant APP_PATH
/Users/lanrion/Projects/mygems/retrench/test/dummy/bin/rails:6: warning: previous definition of APP_PATH was here
Error: Command '-p' not recognized
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:
 application  Generate the Rails application code
 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.

对应Spring 官方的issue讨论:rails/spring#259

解决方案:

rake rails:update:bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment