Skip to content

Resolving issue when an alternate BUNDLE_PATH is used#1

Open
garylin wants to merge 1 commit intomasterfrom
fix_bundler_path
Open

Resolving issue when an alternate BUNDLE_PATH is used#1
garylin wants to merge 1 commit intomasterfrom
fix_bundler_path

Conversation

@garylin
Copy link
Owner

@garylin garylin commented Apr 5, 2013

Issue description:

If BUNDLE_PATH in .bundle/config is set to some other directory, for example

BUNDLE_PATH: vendor/foobar

or if bundle install was previous executed with --path parameter

bundle install --path vendor/foobar

Warbler will not able to detect the bundler's gemspec location correctly (from the bundler's load_from attribute). As the result, a corrupted bundle gem will be included into the war file and we will see a load error when attempting to run this war file inside a servlet container.

Analysis:

The existing code seems to have some logic that tries to detect the location of the bundler.gemspec based on the bundler's load_from attribute. However, the implementation quits after looking up parent folder two times and silently continue without raising any error.

Proposed Change:

Instead of just lookup parent folders for 2 levels, the fix keep searching for the bundler gemspec until it hits the root dir. If bundler gemspec cannot be found, it will raise an error message and exit the build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant