changed #to_f comparison to #to_s as Rails.version now returns Gem::Version