floriansuchan
floriansuchan

Reputation: 257

Rails.env.production? returns true in staging environment

I've got two rails apps deployed on heroku. One in staging - the other in production environment. I have also set up a staging.rb file in my config directory. For deploying to my staging app, I use "git push staging master" but the condition Rails.env.production? still returns true, which I only want in my prod app. What am I missing?

Upvotes: 1

Views: 5632

Answers (1)

Paritosh Piplewar
Paritosh Piplewar

Reputation: 8122

you have to set environment to staging in heroku. So, you have to use this command

heroku config:set RAILS_ENV=staging

Upvotes: 7

Related Questions