Skip to content


Subversion checkout URL

You can clone with
Download ZIP


--standalone generates file in incorrect PWD #2048

ismell opened this Issue · 8 comments

4 participants


I ran the following

bundle install --gemfile=src/main/webapp/WEB-INF/Gemfile --path ./target/bundler/ --standalone

and it generated the setup file in the following location target/bundler/bundler/setup.rb while it installed the gems in src/main/webapp/WEB-INF/target/bundler/. So it assumed that the --path was relative to the Gemfile instead of the PWD. It also created the .bundle/config in the WEB-INF folder.

Personally I think the --path option should be relative to the PWD but it seems to be relative to the Gemfile. So I think we should just make the bundler/setup.rb also relative to the Gemfile's path.


Yeah, I think you're right, and the --path should be relative to the CWD when you invoke the Bundle command. Sounds like standalone makes the right assumption, but the general install code doesn't. Thanks for reporting this!


Cool, I also think --path should be relative to CWD. I think the .bundle folder should also be created in the CWD instead of next to the Gemfile. The reason for this is that the .bundle/config has the --path writen into it so it has to be relative to where it was ran.


Still an issue.

@andremedeiros andremedeiros closed this issue from a commit
@andremedeiros andremedeiros `bundle install --path` is now relative to the CWD.
This makes the option a lot more intuitive, seen as it works like other
CLI commands do. Fixes #2048

Reopening this one.

My attempted fix broke the specs, which is an indicator that it might break in production as well.

@andremedeiros andremedeiros reopened this

Just hit this, admittedly I'm doing something weird: bundle install --standalone in a subdirectory from the Gemfile, expecting the bundle directory to be created inside that subdirectory - instead getting a split.

Trying to get a standalone repro together, but also hitting nil pointer errors so trying to figure out wtf is going on.


nil error happens on 1.6.3 with this repro, but is fixed on master. Master still displays the split install problem:


set -ex


mkdir -p $REPRO_DIR

bundle env

cat > Gemfile <<RUBY
source ""

gem 'O_o'

mkdir test
cd test
bundle install --standalone

!(test -e ../bundle) && test -e bundle/ruby

@indirect what do you say we add the new behaviour back?


If we can do it without breaking specs, let's do it! If not, we should do this in 2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.