Updated gem to work both with Rails 3 and Rails 4