When I start
cap production deploy
it fails like this:
DEBUG [4ee8fa7a] Command: cd /home/deploy/myapp/releases/
Based on Marc's answer which definitely seems to be the right one,
you can workaround this until it is fixed upstream by adding this to your config/deploy.rb in the "namespace :deploy" block:
desc 'Provision env before assets:precompile'
task :fix_bug_env do
set :rails_env, (fetch(:rails_env) || fetch(:stage))
end
before "deploy:assets:precompile", "deploy:fix_bug_env"
This will force loading the env and provisionning RAILS_ENV before assets:precompile is called.