[RFC/PATCH] Bundler/Sandbox documentation updates
lawrence.pit at gmail.com
Wed Mar 9 05:39:35 EST 2011
I tested this out:
- in the before_exec and after_fork I log PATH GEM_HOME GEM_PATH
BUNDLE_GEMFILE for inspection after deployment
- deploy latest release, make sure to shutdown unicorn, then start cleanly
- prune all releases, except the last one
- deploy latest release again (which only sets the BUNDLE_GEMFILE env var)
I've tried this a few times, and everytime I get something like this:
If I revert back to setting the GEM_HOME, GEM_PATH and PATH in the
before_exec it works fine.
PS. When deploying I use USR2 followed by QUIT
> I started playing around with Bundler 1.0.10 today and noticed it's
> quite different than previous versions (based on my limited experiences)
> and the out-of-the-box experience is pretty good regarding (lack of)
> ENV pollution.
> Can any more experienced Bundler (and possibly Capistrano) users
> comment on the below changes and see if they make sense?
> Thanks in advance!
> diff --git a/Sandbox b/Sandbox
> index d101106..46dfb91 100644
> --- a/Sandbox
> +++ b/Sandbox
> @@ -45,11 +45,20 @@ This is no longer be an issue as of bundler 0.9.17
> ref: http://mid.gmane.org/8FC34B23-5994-41CC-B5AF-7198EF06909E@tramchase.com
> +=== BUNDLE_GEMFILE for Capistrano users
> +You may need to set or reset the BUNDLE_GEMFILE environment variable in
> +the before_exec hook:
> + before_exec do |server|
> + ENV["BUNDLE_GEMFILE"] = "/path/to/app/current/Gemfile"
> + end
> === Other ENV pollution issues
> -You may need to set or reset BUNDLE_GEMFILE, GEM_HOME, GEM_PATH and PATH
> -environment variables in the before_exec hook as illustrated by
> +If you're using an older Bundler version (0.9.x), you may need to set or
> +reset GEM_HOME, GEM_PATH and PATH environment variables in the
> +before_exec hook as illustrated by http://gist.github.com/534668
> == Isolate
More information about the mongrel-unicorn