Skip to content

Commit

Permalink
Create the vendor dir and pass the path to bundler
Browse files Browse the repository at this point in the history
The vendor directory needs to exist in the release_path so the symlink
can be created.

The path vendor/bundle should be passed into the bundle command so it
gets installed into the directory under the symlink and available across
deployment. Bundler will do the right thing if gems need to be updated.
  • Loading branch information
jtimberman committed May 24, 2012
1 parent 45e2cda commit 93dbb2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion providers/rails.rb
Expand Up @@ -60,6 +60,11 @@
group new_resource.group
mode '0755'
end
directory "#{new_resource.release_path}/vendor" do
owner new_resource.owner
group new_resource.group
mode '0755'
end
link "#{new_resource.release_path}/vendor/bundle" do
to "#{new_resource.path}/shared/vendor_bundle"
end
Expand All @@ -72,7 +77,7 @@
# Check for a Gemfile.lock
bundler_deployment = ::File.exists?(::File.join(new_resource.release_path, "Gemfile.lock"))
end
execute "bundle install #{bundler_deployment ? "--deployment " : ""}--without #{common_groups}" do
execute "bundle install --path=vendor/bundle #{bundler_deployment ? "--deployment " : ""}--without #{common_groups}" do
cwd new_resource.release_path
user new_resource.owner
environment new_resource.environment
Expand Down

0 comments on commit 93dbb2e

Please sign in to comment.