From e2782d2153e176416224fb7ed8eb37ca6ca98ff3 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 2 Sep 2013 10:59:45 +0200 Subject: specify RAILS_ENV when calling bundle assets-precompile (fixes #3638) We currently disable the billing gem in production while it's on in development and test. Therefore bundler will not install its dependencies - in particular the braintree gem when deploying. Since the RAILS_ENV was not specified rake was called with the default of 'development'. It therefore tried to load the development gems and failed when looking for 'braintree'. Specifying the production RAILS_ENV fixes this. It looks like we'll always need to specify RAILS_ENV when calling rake or we might want to export it to the environment in a separate task or the user config files such as .bashrc --- puppet/modules/site_webapp/manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'puppet/modules/site_webapp/manifests') diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp index 84ec8fab..b3a556a6 100644 --- a/puppet/modules/site_webapp/manifests/init.pp +++ b/puppet/modules/site_webapp/manifests/init.pp @@ -55,7 +55,7 @@ class site_webapp { exec { 'compile_assets': cwd => '/srv/leap/webapp', - command => '/usr/bin/bundle exec rake assets:precompile', + command => '/bin/bash -c "RAILS_ENV=production /usr/bin/bundle exec rake assets:precompile"', user => 'leap-webapp', logoutput => on_failure, require => Exec['bundler_update'], -- cgit v1.2.3