简体   繁体   中英

bundle exec rails always returns rails documentation

When running

bundle exec rails c

or any other rails command like server or runner rails always returns the output of "rails help"

The same installation runs successfully on an other server.

This is assuming you use rvm .

The fact that you copied it from another server probably means you are using the ruby gemset that came with that installation. This might be missing on your new system.

In your appfolder, run: rvm gemset list to see which gemset you are using. Equally you could look for .rvmrc or .ruby-gemset and .ruby-version in the root folder of your app.

rvmrc is outdated but these files should contain ruby version and gemset name that is being used by the app.

Switch to that gemset with:

rvm gemset use <gemset name>

or if it doesn't exist use:

rvm use --create <ruby version>@<gemset name>

Then to install all gems run:

bundle install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM