Look South

Speed up “Find in Project” in TextMate

Ruby on Rails

TextMate’s very useful “Find in Project” is super slow for any decent Ruby on Rails application. The problem turns out to be very simple. TextMate searches the entire project tree including the tmp and log directories. It takes a lot of time to dig through those directories — especially the log directory which can quickly become many megabytes in size. Not only that, rarely do we want “Find in Project” to return results from these directories. The solution is simple. (Continued…)

Paperclip upgrade breaks Amazon S3 upload and how to fix it

Ruby on Rails

My content management system uses Thoughbot’s Paperclip gem to attach photographs to the stories. Photos are uploaded first to the local server. Then the server will later upload the photographs to Amazon S3. The process is transparent and silent — too silent it turned out. (Continued…)

Make URL friendly filenames in paperclip attachments

Ruby on Rails

We use Thoughtbot’s Paperclip gem to attach images and other media to our Ruby on Rails models. When we save documents to a model object, we wanted to make sure the filenames were URL friendly — lowercase with only letters, numbers or hyphens. Paperclip’s processing chain makes it easy to insert this behavior before saving the file or running it through the thumbnail re-sizer. (Continued…)

Our cover is blown

Ruby on Rails

For several years, Loy and I have worked under the company name of Apped Design. It was a cover name Loy came up with when we attended the first Mountain West Ruby Conference in 2007. The Neotribune was on the back burner and we were working on a couple of Ruby on Rails projects. We decided that it would be easier to go as independent consultants than try to explain a long, convoluted startup story no would be interested in anyway. (Continued…)

Test Spec and the Double-R

Ruby on Rails

Last year we did a project with substantial business logic requirements. The Rails testing framework saved us. We could create tests for all the different uses of the system and ensure that these rules were always followed. As wonderful as it was, there was a bitter aspect to Rails testing — fixtures. (Continued…)

Install Ruby on Rails using MacPorts

Ruby on Rails

There are several ways to set up a system for Ruby on Rails development. Leopard comes pre-installed with Ruby and Rails and is perfectly fine for most users. For me, however, I kept running into troubles. Trying to do a free standing install of graphic libraries (FreeImage or ImageMagick) proved too painful. I switched back to using MacPorts. (Continued…)

Multiple uploads using Rails, SWFUpload and AttachmentFu

Ruby on Rails

SWFUpload is a fantastic application which makes short work of a hard problem — how to upload multiple files to a website. Most solutions using Ruby on Rails revolve around multiple fields and complex ajax calls to monitor the upload progress. These are all hard to implement because they lack compatibility across browsers, require difficult server set up, and usually fail to update quick enough to give real upload progress feedback to the user. (Continued…)