Browse Source

Make error handling as robust as one would expect in a general-purpose
Rails recipe.

Troy Davis 14 năm trước cách đây
mục cha
commit
d75d5c177b
1 tập tin đã thay đổi với 10 bổ sung3 xóa
  1. 10 3
      recipes/rails.rb

+ 10 - 3
recipes/rails.rb

@@ -184,11 +184,18 @@ deploy_revision app['id'] do
 
   before_migrate do
     if app['gems'].has_key?('bundler')
-      execute "bundle install" 
+      execute "bundle install" do
+        ignore_failure true
+      end
     elsif app['gems'].has_key?('bundler08')
-      execute "gem bundle"
+      execute "gem bundle" do
+        ignore_failure true
+      end
+
     elsif node.app_environment && app['databases'].has_key?(node.app_environment)
-      execute "rake gems:install RAILS_ENV=#{app['migrate'][node.app_environment]}"
+      execute "rake gems:install RAILS_ENV=#{app['migrate'][node.app_environment]}" do
+        ignore_failure true
+      end
     end
   end
 end