Reputation: 18250
Couldn't find it in the docs, nor on SO, but is there a way to run the Rails (3.2.x) console in sandbox mode on heroku (Celadon Cedar), equivalent to
rails console --sandbox
Upvotes: 9
Views: 6338
Reputation: 559
If you're here because rails console --sandbox
stopped working for you as of 09/23, you'll need to explicitly add quotes around your rails command to get Heroku to recognize it.
heroku run 'rails console --sandbox' -a your-app
Upvotes: 6
Reputation: 18250
For a more "the Heroku way" alternative, heroku run console --sandbox
does the trick as well:
$ heroku run console --sandbox
Running `console --sandbox` attached to terminal... up, run.6024
[...]
Loading production environment in sandbox (Rails 3.2.12)
Any modifications you make will be rolled back on exit
irb(main):001:0>
Upvotes: 22