Use Rails.env instead of RAILS_ENV

Starting from Rails 2.x, Rails introduced the Rails module where you
can get the environment from.