December 12

0 comments

Running Rails Console in production while using Spring

By Christopher Mendla

December 12, 2017


Last Updated on November 29, 2019 by Christopher G Mendla

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.

Christopher Mendla

About the author

Leave a Reply

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

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}