Rails 3 2

Swapped out RAILS_ENV for Rails.env to allow for compatibility with Rails 3.2