Migrated gem to be compatible with Rails 3.x