Toontje
Toontje

Reputation: 1485

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

Upvotes: 0

Views: 1397

Answers (2)

Toontje
Toontje

Reputation: 1485

found the issue, I needed to run the command

bundle exec rails c production

as the 'deploy' user

Upvotes: 0

Mark
Mark

Reputation: 6445

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

Upvotes: 0

Related Questions