Browse Source

Fix bundler08 handling

Troy Davis 15 years ago
parent
commit
2eddf53351
2 changed files with 5 additions and 3 deletions
  1. 2 2
      README.md
  2. 3 1
      recipes/rails.rb

+ 2 - 2
README.md

@@ -58,8 +58,8 @@ Using the node's `run_state` that contains the current application in the search
 
 This recipe can be used on nodes that are going to run the application, or on nodes that need to have the application code checkout available such as supporting utility nodes or a configured load balancer that needs static assets stored in the application repository.
 
-For Gem Bundler: include `bundler` or `bundle08` in the gems list.  `bundle install` will be run before migrations.
-For config.gem in environment: `rake gems:install RAILS_ENV=<node environment>` will be run when `bundle install` is not.
+For Gem Bundler: include `bundler` or `bundler08` in the gems list.  `bundle install` or `gem bundle` will be run before migrations.
+For config.gem in environment: `rake gems:install RAILS_ENV=<node environment>` will be run when a Gem Bundler command is not.
 
 unicorn
 -------

+ 3 - 1
recipes/rails.rb

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