Running Rails Console in production while using Spring
Last Updated on
This one drove me nuts for a couple of hours. I needed to modify the contents of the user table in a rails app using rails console.
After a bit of trying it seemed that I was running the rails console in development mode. So, I tried the obvious rails console production. After checking the tables, I found I was still in the development mode.
I found a post in Stack Overflow that got me halfway there. The suggestion was to run the following command.
DISABLE_SPRING=true rails console
That was still bringing me to the development mode. I changed the command to the following and it worked.
DISABLE_SPRING=true rails console production
This allowed me to modify the user table as I needed.
- Using Always Up to run Ruby on Rails Puma Servers as a service on Microsoft IIS servers.
- Viewing your SQLLite Data (Ruby on Rails beginners)
- Responsive pages with Artisteer / Ruby
- Creating Entity Relationship Diagrams in Rails.
- Use the Bundle Outdated command to keep your Rails applications secure
- Samsung saga – voice command failure
- Accessing an external sql database from a rails app where the schema prefix differs from the schema prefix used for the app’s tables.
- Capturing failed logins when using adauth