From: Tom Hughes Date: Fri, 20 Feb 2015 16:35:09 +0000 (+0000) Subject: Use bundler to run rake X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/6d49ebff40c174a7d7b149c06d6ebdfe74cf77c9?ds=sidebyside Use bundler to run rake --- diff --git a/cookbooks/web/definitions/rails_port.rb b/cookbooks/web/definitions/rails_port.rb index 205695c08..a7a8c933e 100644 --- a/cookbooks/web/definitions/rails_port.rb +++ b/cookbooks/web/definitions/rails_port.rb @@ -79,7 +79,7 @@ define :rails_port, :action => [:create, :enable] do execute "#{rails_directory}/public/assets" do action :nothing - command "rake#{ruby_version} assets:precompile" + command "bundle#{ruby_version} exec rake#{ruby_version} assets:precompile" environment "RAILS_ENV" => "production" cwd rails_directory user rails_user @@ -90,7 +90,7 @@ define :rails_port, :action => [:create, :enable] do execute "#{rails_directory}/db/migrate" do action :nothing - command "rake#{ruby_version} db:migrate" + command "bundle#{ruby_version} exec rake#{ruby_version} db:migrate" cwd rails_directory user rails_user group rails_group