Category Archives: Rails

acts_as_paranoid and acts_as_versioned on Rails 3

A few years ago, I described how to combine acts_as_paranoid and acts_as_versioned in order to make deleted records end up in your versioning tables. In order to do the same thing under Rails 3, I had to make a few … Continue reading

Posted in Rails | 1 Comment

monit, mongrel_rails and ENV["HOME"]

So your mongrels are humming along happily and you have monit monitoring them with a definition like this: check process mongrel_8010 with pidfile /path/to/current/log/ start program = “/usr/bin/mongrel_rails cluster::start -C /path/to/current/config/mongrel_cluster.yml –clean –only 8010″ stop program = “/usr/bin/mongrel_rails cluster::stop -C … Continue reading

Posted in Rails | Tagged , , , , , , | Leave a comment

on the importance of gem cleanup

I have a monit config that tries to stop/start mongrel instances like this: start program = “/usr/bin/mongrel_rails cluster::start -C path-to-mongrel_cluster.yml –clean –only PORT” stop program = “/usr/bin/mongrel_rails cluster::stop -C path-to-mongrel_cluster.yml –clean –only PORT” I have the latest mongrel_cluster gem installed … Continue reading

Posted in Rails, Sysadmin | Leave a comment

rails, mongrel and mysterious gpgme errors

Mongrel changes its user and group id to the user you specify when started as another user (say, root). However, it does not change the environment variables from the user it was started as. In particular, ENV["USER"] and ENV["HOME"] remain … Continue reading

Posted in Rails | Leave a comment

acts_as_paranoid and acts_as_versioned

So you’re writing a web-based application and you want journalling: when database records change, you want to keep track of the changes so that you have an audit trail. There are many ways to do this. If your application is … Continue reading

Posted in Rails | 3 Comments