Posts Ruby On Rails console sandbox mode
Post
Cancel

Ruby On Rails console sandbox mode

Ruby On Rails console sandbox mode

If you want to perform some data migration/modification on production and you want to be sure that it will not break anything you can always perform a test run using rails console with –sandbox flag.

After entering console with

1
rails console production --sandbox

you will get following information

1
2
Loading production environment in sandbox (Rails X.X.X)
Any modifications you make will be rolled back on exit

You can now safely perform data migration and check if everything is OK.

This post is licensed under CC BY 4.0 by the author.