Changed RACK_ENV to RAILS_ENV