spork with ruby 1.9 and Test::Unit
If you do testing in your Rails apps (which, you do, of course), you’ll get tired of waiting 45 seconds for poor little rake to run and load the entire Rack and Rails stack each time you want to test a tiny change. Spork makes things much more snappy. And snappy is good, it might [...]
setting up a postgreSQL user for testing in Rails
When testing a Rails app backed by a postgreSQL DB, rake db:test:load and the unit tests drop and re-creates the entire database. As such, the database user used in the testing environment needs to be able to drop and create databases. In postgres, you do that by assigning the CREATEDB privilege directly to the testing [...]
Multi-staging capistrano deployment with rvm, git and passenger
Here is an object lesson in the old philosophy of simple, convenient tools that focus on doing one thing, and one thing well, and also combine and inter-operate well with other tools, to create one monster flying space robot with laserbeam eyes that crushes everything. Here is what we want to do in a typical [...]
saving image dimensions with file_column
A minor UI detail in development required that we include the width and height of certain images in the HTML and XML views. Since we were using the file_column plugin, which doesn’t normally save any image information besides the file name, this turned out to require some hacking.
bringing backgroundrb out of the dark ages
Due to voracious memory consumption issues that were bringing down the server, I had to upgrade the backgroundrb plugin inside a certain Rails app from version 0.2.1 (from Nov 06) to the latest svn trunk, which uses fork() and exec() properly, and seems to be a near-total rewrite. There were a lot of changes needed. [...]