Skip to content

Conversation

@jsvd
Copy link
Member

@jsvd jsvd commented Dec 5, 2014

the "standalone" flag during rake bootstrap is needed to generate the bundler setup.rb flag.
However, that generates a "tools/.bundle/config" file that sets the BUNDLE_PATH and will later mess with rake plugin:install-defaults, forcing all plugins to be installed in "vendor/bundle" instead of "vendor/plugins".

Setting "--path" in rake plugin:install-defaults isn't an option because then gems from "vendor/bundle" will not be reused, generating many duplication and some installation errors.

The only option I could find was to remove the ".bundle" dir after running rake vendor's "bundle install"

Closes #2183

@elasticsearch-release
Copy link

💚 Test passed.
Refer to this link for build results (access rights to CI server needed):
http://build-eu-00.elasticsearch.org//job/Logstash_PR/301/
💚 Test passed.

@elasticsearch-release
Copy link

💚 Test passed.
Refer to this link for build results (access rights to CI server needed):
http://build-eu-00.elasticsearch.org//job/Logstash_PR/302/
💚 Test passed.

@jordansissel
Copy link
Contributor

Rule #1 of using Bundler: Always, always, always delete .bundle/config

TBH, I'd be happy monkeypatching Bundler to purge its ability to write .bundle/config.

@jordansissel
Copy link
Contributor

I wonder if we should file a feature request on bundler/bundler to ignore .bundle/config if we have any flags on the cli? IMO bundle install should only use the config if there are no arguments beyond install

@electrical
Copy link

LGTM. :shipit:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this to a separate method, maybe, that we invoke after any bundler invocation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since there are 2 or 3 calls to bundler we should have a DRYer version of doing it indeed..but they differ quite a lot and, on a first glance, the number of arguments to this new function is pretty big (jruby+bundler path, environment tweaks, bundler arguments) so I have to come up with a proper solution..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on improving how we invoke bundler later.

@elasticsearch-bot
Copy link

Merged sucessfully into master 1.5!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LoadError: no such file to load error while running rake artifact:tar

5 participants