Open domicode opened 7 years ago
Hmm we don't really do anything to the default Capistrano Rails tasks, and RAILS_ENV
should always be set consistently during all Capistrano tasks.
Can you check the environment in your ar_internal_metadata
table on the server? It's possible that you ran migrations once with a different RAILS_ENV
, which then got stored in that table.
[{"key"=>"environment", "value"=>"production", "created_at"=>"2017-06-28 15:34:25.812474", "updated_at"=>"2017-06-28 15:34:25.812474"}]
so should be okay
Can you send me the Capistrano output and the link to the repository? (on Rocket.Chat if it's sensitive :))
most probably because of this: http://blog.bigbinary.com/2016/06/07/rails-5-prevents-destructive-action-on-production-db.html
I had to run the migration manually. I am not sure if that's standard or maybe because I have a bit more complex setup with devise and devise_token_auth
run migrations on server:
bundle exec rake RAILS_ENV=production db:migrate DISABLE_DATABASE_ENVIRONMENT_CHECK=1