Reputation: 1936
I was trying to run my test cases on heroku.
Fund many blogs/answers telling how to run staging/custom environment on heroku.But whenever I run heroku run rspec spec/
it returns you are running production environment
(not exact error).
So my qustion is not how to run staging/custom evironment on heroku but when I login into heroku rails console, I should be able to see
Rails.env #=> test
Or staging or whatever.
Any help is appreciable.
Upvotes: 0
Views: 325
Reputation: 659
In heroku dashboard, you should just set RAILS_ENV
and RACK_ENV
to test
.
After setting these variables, I was able to start the console in test environment.
Upvotes: 4