If you are using *NIX systems, you can try the following
In your terminal run the command below
export RAILS_ENV=production
NOTE: This will set the environment to production temporarily, if you need this permanently, add this to your .bashrc file
And then start your application server.
Inside the boot.rb file, use ENV['RAILS_ENV']
instead of Rails.env
Hope this helps.