config.consider_all_requests_local to true in config/environments/production.rb