fix gem to work with rails 4.0