Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370181 - dev-ruby/bundler-1.0.13 bundle exec does not work together with bundle install installed gems
Summary: dev-ruby/bundler-1.0.13 bundle exec does not work together with bundle instal...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-05 20:34 UTC by Petteri Räty (RETIRED)
Modified: 2023-11-06 22:22 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2011-06-05 20:34:19 UTC
betelgeuse@pena ~/hobo/gentoocouncil/site $ bundle exec rake
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.13/lib/bundler/rubygems_integration.rb:194:in `bin_path': can't find executable rake (Gem::Exception)
        from /home/betelgeuse/.gem/ruby/1.8/bin/rake:19
betelgeuse@pena ~/hobo/gentoocouncil/site $ bundle show rake
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7

I think the cause of this is me testing bundle install with a simple Gemfile for newest rails which resulted in a newer rake being installed:

betelgeuse@pena ~/test/gemfile $ bundle show rake
/home/betelgeuse/.gem/ruby/1.8/gems/rake-0.9.1
Comment 1 Hans de Graaff gentoo-dev Security 2011-06-19 13:01:40 UTC
Could you figure out where the 'bundle install' action put the rake binary? If things are installed in your home directory then that should be ${HOME}/bin/rake, but it might also have ended up in /usr/local/bin/rake due to a bug in our rubygems defaults.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2011-06-19 16:46:59 UTC
There's do exist:

/home/betelgeuse/.gem/ruby/1.8/gems/rake-0.9.1/bin/rake
/home/betelgeuse/.gem/ruby/1.8/bin/rake

These don't exist:

betelgeuse@pena ~/test/gemfile $ file /usr/local/bin/rake
/usr/local/bin/rake: ERROR: cannot open `/usr/local/bin/rake' (No such file or directory)
betelgeuse@pena ~/test/gemfile $ file ${HOME}/bin/rake
/home/betelgeuse/bin/rake: ERROR: cannot open `/home/betelgeuse/bin/rake' (No such file or directory)
Comment 3 Hans de Graaff gentoo-dev Security 2011-06-19 17:30:02 UTC
(In reply to comment #2)
> There's do exist:
> 
> /home/betelgeuse/.gem/ruby/1.8/gems/rake-0.9.1/bin/rake
> /home/betelgeuse/.gem/ruby/1.8/bin/rake

ok, that's the usual gem layout.

> betelgeuse@pena ~/test/gemfile $ file /usr/local/bin/rake
> /usr/local/bin/rake: ERROR: cannot open `/usr/local/bin/rake' (No such file or
> directory)
> betelgeuse@pena ~/test/gemfile $ file ${HOME}/bin/rake
> /home/betelgeuse/bin/rake: ERROR: cannot open `/home/betelgeuse/bin/rake' (No
> such file or directory)

So it appears that bundle install doesn't add the bin wrappers like gem install does. As far as I know we don't do anything unusual in this area. Bundler is vanilla on our systems, and I don't think anything we do in rubygems should be of influence.

Would be interesting to test this on macos to see what happens. That way we can find out if this is an upstream issue, or something we do.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2011-06-19 19:26:16 UTC
(In reply to comment #3)
> 
> Would be interesting to test this on macos to see what happens. That way we can
> find out if this is an upstream issue, or something we do.

What I can make of this issue with a quick look is as follows:

betelgeuse@pena ~/hobo/gentoocouncil $ bundle exec rake
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.13/lib/bundler/rubygems_integration.rb:194:in `bin_path': can't find executable rake (Gem::Exception)                                                                                                
        from /home/betelgeuse/.gem/ruby/1.8/bin/rake:19 

Here bundler tries to use the bundle install installed nrake binary for version 0.9.1. The rake binary for the rake version locked by Gemfile is the system binary:

betelgeuse@pena ~/hobo/gentoocouncil $ bundle show rake
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7

My guess is that the bundler installed rake binary can't be used to activate Portage installed fakegem binaries.
Comment 5 Ewoud Kohl van Wijngaarden 2013-06-11 09:47:49 UTC
I think I'm running into the same issue. Is the status CONFIRMED still correct?
Comment 6 Hans de Graaff gentoo-dev Security 2015-07-07 09:06:06 UTC
Could someone retest this with a more recent version of bundler and maybe create reproduceable steps to trigger this issue?

It might be related to us adding more default gem paths, which bundler probably doesn't anticipate.