This was stupid.. just found ENV['RAILS_ENV'] = 'development'
in my environment.rb When I changed it to ENV['RAILS_ENV'] ||= 'development'
all is good.
autotest not using the right environment
-
16-03-2022 - |
Pergunta
When running Autotest, Autotest doesn't run in the "test" environment. How can I force it to run in "test"?
I have tried RAILS_ENV=test bundle exec autotest
and export RAILS_ENV=test; bundle exec autotest
But still Rails.env equals 'development'.
My Gemfile has autotest defined in the 'test' group. It finds the specs, but it's executing against the development database and puts Rails.env
is displaying "development"
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow