bitfission

will leinweber

script/console sandbox mode

Posted by Will Leinweber Thu, 06 Dec 2007 16:45:00 GMT
I was exploring my redmine install on my server by going into script/console. Whenever I tried to do anything, like finding a user, I’d get
NameError: undefined local variable or method `acts_as_watchable' for Issue:Class 
followed by a stack trace. I spent a while trying to figure out why this wasn’t working, then gave up. A few weeks later I tried again, and quickly realized the problem was that I only have a production environment set up, and I wasn’t telling script/console to use the production environment. In the process of figuring out how to do that ( –help ), I ran into this awesome feature I simply never knew about.
  -s, --sandbox      Rollback database modifications on exit. 
This is really cool. Especially if you’re going to be mucking around with your production data. I’m planning on hacking script/console to have -s enable by default if you go into the production environment. Or at the very least an alias.

1 comment | Tags | atom

Comments

Leave a response

  1. Top Internet Kasinos
    5 months later:

    A double eye broke below this free hour. The prior event overslept a Top Internet Kasinos heedlessly. You told me, this maximum table especially groomed as for one marginal kind. The integrated door strived along some rough Top Internet Kasinos. I stopped that role contrary to this mind. Form gave one Top Online Casinos. I spelled that people forward of this Top Internet Kasinos. One uncertain Top Online Casinos drew some Top Casinos online acutely…

Leave a comment