]> git.openstreetmap.org Git - chef.git/commitdiff
Use bundler to run rake
authorTom Hughes <tom@compton.nu>
Fri, 20 Feb 2015 16:35:09 +0000 (16:35 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 20 Feb 2015 16:35:09 +0000 (16:35 +0000)
cookbooks/web/definitions/rails_port.rb

index 205695c08251fd8374756ffd351d29886f314a8c..a7a8c933ed5f0394caf7378f6f3761e64cc20f47 100644 (file)
@@ -79,7 +79,7 @@ define :rails_port, :action => [:create, :enable] do
 
   execute "#{rails_directory}/public/assets" do
     action :nothing
 
   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
     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
 
   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
     cwd rails_directory
     user rails_user
     group rails_group