Possible Duplicate:
Heroku automatically changing RAILS_ENV and RACK_ENV variables to “production” on every deploy
I am currently trying to write a Rake script that will run the commands I need to do a deployment to my staging app, that will use asset_sync to copy over my assets to my cdn.
namespace :deploy do
desc 'Deploy the app'
task :staging do
app = "app-name"
remote = "git@heroku.com:#{app}.git"
system "git push #{remote} master"
system "heroku run rake assets:precompile --app #{app}"
end
end
However when I run this Heroku is overwriting my RAILS_ENV (amongst others) back to production.
Running Heroku releases afterwards
v143 Deploy 2b3aa3f 10m ago
v142 Add RAILS_ENV, RACK_ENV, PATH, LANG, G.. 10m ago
Any ideas why it might be doing this?
Many thanks
Phil