简体   繁体   中英

running Rails 5.1 console in production

I installed a Rails 5.1 app on a Ubuntu 14.04 server.

I have to run a rails console

so I changed directory to cd /opt/www/myapp/current

and entered the command:

rails c production

but then I get this error message:

The program 'rails' can be found in the following packages: * ruby-railties-3.2 * ruby-railties-4.0 Try: sudo apt-get install

I tried to run the command with bundle:

bundle exec rails c production

but then I get this error message:

Undefined local variable or method `git_source' for Gemfile from /opt/www/myapp/releases/20171017091250/Gemfile:3

I'm not sure what's going on.

Can someone help me run rails console on my production server?

Thanks a lot,

Anthony

Undefined local variable or method `git_source' for Gemfile

Or to save you visiting the link, try:

gem update bundler

git_source was added in bundler 1.6

found the issue, I needed to run the command

bundle exec rails c production

as the 'deploy' user

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