Tim Riley

Lessons learnt the hard way: Don't use script/console --sandbox on production apps

September 10th 2008

Don’t use script/console -s or script/console --sandbox on your live, running Rails application. The built-in transactions that roll back on exit are nifty, but if your database’s transactions use any kind of locking, then you will get locks on the tables for any models that you use in the console. This will most likely stop your application from working.

Moral of the story? If you need to use the console on a live application, just be careful. You’re smart, you’re cautious, you don’t need the sandbox. It will only cause more trouble than it is worth.

Tim Riley

Hi, I'm Tim Riley. I'm a web developer based in Canberra, Australia, where I work at a small design studio called Icelab. This is my blog, where I can share with you the things I learn as I go about building products for the web.

What I Build

Recent Presentations

  1. Facebook Authentication with OAuth
  2. JavaScript Testing with Capybara and Cucumber
  3. Using Titanium to Build Mobile Apps with JavaScript (audio)
  4. An Introduction to Sinatra
  5. Building your Capistrano Recipe Book