Make the gem compatible with Rails v. > 3

Please update the gem on `rubygems.org` as well.