Bug 1163039 - Bundler can't see its dependencies after Bundler.setup
Summary: Bundler can't see its dependencies after Bundler.setup
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-bundler
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Josef Stribny
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 1163041 1163042 1163076 1163083 1163085
TreeView+ depends on / blocked
Reported: 2014-11-12 09:35 UTC by Josef Stribny
Modified: 2016-01-04 05:53 UTC (History)
6 users (show)

Fixed In Version: rubygem-bundler-1.7.6-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1163041 1163042 1163076 1163083 (view as bug list)
Last Closed: 2014-11-12 13:52:17 UTC
Type: Bug

Attachments (Terms of Use)

Description Josef Stribny 2014-11-12 09:35:37 UTC
Description of problem:

Bundler can't see its dependencies after Bundler.setup.

If thor or net-http-persistent are already in memory, Bundler can reuse them just fine, but if Bundler locks the Gemfile and those libs are not already loaded, Bundler doesn't see them even though they are its dependencies. 

Originally these dependencies are vendored inside the gem, but we removed them in Fedora. For Bundler to function as expected and designed by upstream we should most likely symlink the originally vendored libs to system-installed RubyGems.

I am including a simple reproducer for rawhide although I came across this in the real usecase when Vagrant couldn't download remote plugins, because Bundler (which Vagrant uses underneath) uses net-http-persistent for that.

How reproducible:

$ bundle init
$ irb
> require 'bundler'
> Bundler.setup
> require 'bundler/vendored_thor'
LoadError: cannot load such file -- thor
	from /usr/share/gems/gems/bundler-1.7.4/lib/bundler/vendored_thor.rb:7:in `require'
	from /usr/share/gems/gems/bundler-1.7.4/lib/bundler/vendored_thor.rb:7:in `<top (required)>'
	from (irb):5:in `require'
	from (irb):5
	from /usr/bin/irb:11:in `<main>'

Comment 1 Josef Stribny 2014-11-12 13:52:17 UTC
I did a new build that contains the fix. This issue is fixed by generating the proper symlinks to system RubyGems after installation of bundler or uninstallation of old thor/net-http-persistent gems.

Note You need to log in before you can comment on or make changes to this bug.