Thoughts, information and reflections about technology

Running Rails Console in production while using Spring

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.

 

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact me
Archives
Categories
Amazon Disclosure

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.