Update Rails environment call

Switch from ENV['RAILS_ENV'] to Rails.env
Merge pull request #2 from paulsturgess/master

Good call!