Archive of posts from 2012

Port Forwarding In Linux

For reasons which I will not go into for fear of boring everyone, we were trying to forward local requests on port 80 to port 3000 (running a Rails app), without booting the Rails app on port 80, and without having a web server in the middle to do the redirection.

Upgrading Rails Engines to Rails 3.2

Wtih the recent release of Rails 3.2, we have been trying to upgrade all our engines at Sage to use Rails 3.2. Everything works great, except scaffolding.

Testing Rails Engines With Rspec

After my lightning talk at [Ruby North East](, a couple of people asked me how to go about getting set up with an engine with RSpec as the testing framework. We've automated this at Sage, but here's what's necessary.

TimThumb Hack Check Script

I was recently a victim of the [timthumb vulnerability]( At first I noticed some rogue PHP in all my index.php files, which I cleaned up. But it turned out they had already got in enough to re-hack in no time at all. This time it was my javascript files which all had some obstruficated code in them, causing every page load to make a request to some random site.