How to get non-model data in ActiveRecord Callbacks
On a project I’m currently working on, we use ActiveRecord callbacks heavily. From simplying creating other associated objects, to recording the historic activity about the object in question, and...
View ArticleHow to install RVM on Ubuntu 10.04
I’ve heard people describe frustrations they had in getting Rails 3 setup on Ubuntu 10.04 with Ruby 1.9.2. I’m going to outline the steps I’ve taken to do this. Let’s get started installing RVM. It...
View ArticleSplitting Rails DOM ids with RegEx Look Aheads
In my Rails erb views I make good use of the dom_id view helper method. It basically introspects the object you pass to it and creates a unique id to use in your markup, based on the object type and...
View ArticleRails 3 Authlogic sessions not persisting in production
I just ran into a rather hard to track down issue with Authlogic and Rails 3. After upgrading an old app to Rails 3, in production, the sessions wouldn’t persist, but everything worked fine in...
View ArticleRuby 1.9.2 Segmentation Fault and OpenSSL
In one of my current project, whenever I ran a rake task that did a net/http request it was causing segmentation faults. $ bundle exec rake test:task$...
View ArticleNo view_context, in views, in Rails 3.1 changes
Got burned by two things today in one of my apps by upgrading to Rails 3.1. The first thing was a few nested forms stopped working when editing an existing record that had child records. None of the...
View ArticleCan’t get SSH Public Keys working?
Having problems getting ssh to use your public key? Log on to your server as root using a password. Remember not to log out as root until you have ssh working with your public key or you may...
View ArticleHow to set the timezone on Ubuntu Server
I find it’s pretty annoying when you have to go log file spelunking only to find all the timestamps are in UTC. But we can set the timezone of the server so when Rails, cron, scripts, etc run, they...
View ArticleRailsConf RubyAZ Presentation Slides
This past Tuesday evening I presented to the RubyAZ user group. The talk covered useful libraries and gems that I saw at Rails Conf 2012 that I thought others might find helpful in their day to day...
View ArticleWeb Development Services
Just wanted to make a quick post that if you’re interested in Ruby on Rails Development, please contact me over at Velocity Labs instead of here. Thanks!
View Article