How to solve the “undefined method `deep_symbolize_keys’ for nil:NilClass” error in Rails

I was trying to migrate a table in my Rails app and got this error: undefined method `deep_symbolize_keys’ for nil:NilClass It’s a strange error, and there weren’t very many hits on Google. A lighthouse ticket provided a clue. The problem wasn’t one of my plugins or gems — it was i18n itself. Upgrading from 0.4.1 …

HOWTO install the rjb gem on Ubuntu and Mac OS X

Here’s how to install the Ruby Java Bridge (rjb) gem on Ubuntu Linux and Mac OS X: Ubuntu Linux (10.10) # aptitude install openjdk-6-jre-headless openjdk-6-jdk # JAVA_HOME=/usr/lib/jvm/java-6-openjdk gem install rjb Mac OS X 10.6.4 # JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home gem install rjb Note: rjb 1.3.2 requires the Java for Mac OS X 10.6 Update 3 Developer Package. If …

How to install MediaWiki on a subdomain

Here is how to set up MediaWiki on a subdomain and use pretty/short URLs. This was tested on July 1, 2010 with MediaWiki 1.15.4, PHP 5.2.8, MySQL 5.0.90 and Apache 2.2.11. This assumes you are in a shared hosting situation, and do not have root access and cannot edit the Apache configuration files directly. Your …

When to buy a refurbished Mac

No, I’m not going to tell you when during the year to buy a Mac (“not the week before WWDC”), but I am going to share a neat trick. Tragedy of the commons, here we go. Apple’s online store has refurbished Macs for sale. These are often a very good deal — today’s selections range from …

Handling Rails errors: custom error pages, logging, notification

I wanted to improve error handling In my Rails applications. Specifically, I wanted three things: a custom error page that matched the site's design the errors to appear in the error log (production.log) email notification of server errors Note: these steps are for Rails 2.3.2–2.3.8. Other versions may require different instructions. Custom error page Normally, …

Another solution for WordPress’ “You do not have sufficient permissions to access this page.”

Many WordPress users have run in to the error “You do not have sufficient permissions to access this page.” Sometimes, it is because you changed the table prefix and the solution is a database change. For other folks, it was due to old plugin incompatibility. To fix it, you need to replace admin_head with admin_menu. …

The great Mac OS X Software Update chart

Recently, my friend Rob posed a question to twitter: Is Mac OS X 10.5.7 the single biggest patch Apple has ever released, or just one of the biggest? I thought that was an easy question to anwser. I was wrong. I looked all over the web for this information, and no one seemed to have …