Fixes Rails env bug

Changing Old RAILS_ENV to Rails.env