bdunagan
fill the void

Posts Tagged development

Ruby Tip: 1.8.7 and 1.9.2, Side by Side

Recently, I needed to run rake test on a Ruby gem with both Ruby 1.8.7 and 1.9.2. I wanted to figure out why Travis CI was failing for the gem. Not a problem with rvm, even on Lion (10.7). To install a version of Ruby, use rvm install: You can check that it’s installed with [...]


Searching GitHub Wikis with Gollum

Over a year ago, GitHub updated their wiki system to be powered by git. It was an awesome upgrade. Now I can check out a wiki, just like source code, and edit it in TextMate, just like source code. Really, really nice…except I can’t search. Luckily, GitHub released Gollum. Gollum is a local version of [...]


Logging slow queries in MySQL

It’s straight-forward to log slow queries in MySQL both on your local machine and on an Amazon AWS RDS instance. I’ll walk through both, although MySQL has good documentation on slow query log and log destinations. Local MySQL There are many blog posts about enabling slow query logging to a file within the MySQL data [...]


Rails Tip: Logger in Rake

Here are a couple lines of Ruby to bring Logger into rake tasks. I use them for logging cron jobs that are Rails rake tasks. I tried this post, but it didn’t get me all the way.


Rack Tip: ActiveRecord with Logging

Using ActiveRecord in Rack is one line of Ruby code, and setting up database logging outside of Rails is just as easy. As a minor extension of this excellent tidbit, you simply instantiate the Logger object with a file path. Here’s the code: