Fix RAILS_VERSION check