The current version check is:
::Rails::VERSION::STRING.to_i >= 3.1
This fails because an integer has no decimal portion. Changing the to_i to to_f would work in this case, but it'll similarly lose the patch level portion of the version number. The check I'm doing in this pull request uses the same version comparison API that RubyGems uses itself.
Fixed the Rails version check.
Wow, that's pretty embarrassing. Thanks for the patch! :)