summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-09-02 10:59:45 +0200
committerAzul <azul@riseup.net>2013-09-02 12:01:34 +0200
commite2782d2153e176416224fb7ed8eb37ca6ca98ff3 (patch)
treeb4a2102f12a795e8d5dfd1da02f46d221f2d3e8e
parentff26ca98604d9e3f3856cca2af678b21c096d1ee (diff)
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
-rw-r--r--puppet/modules/site_webapp/manifests/init.pp2
1 files changed, 1 insertions, 1 deletions
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'],