re: Rails quick tips #1: Console sandbox VIEW POST


Yes, --sandbox is very handy, but I cringe every time I see someone use it on a production system.

Sandbox mode doesn't just rollback, it creates an enclosing transaction for all of the commands you do while in that instance of the console. If you change database rows in that transaction, updates to the tables and rows affected can block for other users. This can cause lockups for other users if used in production.

Any rails console actions on production should be done carefully, and should (IMHO) never use --sandbox. Sandbox mode is really useful for development and other non-critical systems.


Good point! To be honest I never even thought about someone using this on a production app :O

code of conduct - report abuse