update the gem so it works both with rails 3 and rails 4