Make sure we are comparing gem versions, closes #1024

Due to rails/rails#8501, we can no longer case the Rails version to a float. This version should hopefully work on both Rails 4 master and on Rails 3.