I am trying to run a rails console in amazon opsworks, I have tried:
sudo rails console -e production
sudo rails console production
RAILS_ENV=production sudo rails console
RAILS_ENV=production RACK_ENV=production sudo rails console
With each of those commands the console is spinning up in the development environment. What do I need to do to get this console started in the environment of my choosing?
sudo su deploy # switch to the app user
cd /srv/www/myapp/current # your deploy dir might be different (check logs if unsure)
RAILS_ENV=production bundle exec rails console
Assuming you are ssh'd into the instance.
$ cd /srv/www/yourapplication/current
$ sudo bundle exec rails console
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With