rvm/rubygems-bundler

system wide gems broken?

kostya opened this issue · 11 comments

i using system wide gem, console utility, not related with any project.
when i cd into project with gemfile, its broken.

example, my gem confuddle and executable 'un':

gem list confuddle
*** LOCAL GEMS ***
confuddle (0.0.2)

which un
/home/kostya/.rvm/gems/ree-1.8.7-2012.02/bin/un

un
---ok

after cd into some project with gemfile

gem list confuddle
*** LOCAL GEMS ***
confuddle (0.0.2)


which un
/home/kostya/.rvm/gems/ree-1.8.7-2012.02/bin/un

un
/home/kostya/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:812:in `report_activate_error': Could not find RubyGem confuddle (>= 0) (Gem::LoadError)
    from /home/kostya/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:223:in `activate'
    from /home/kostya/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:1146:in `gem'
    from /home/kostya/.rvm/gems/ree-1.8.7-2012.02/bin/un:18
    from /home/kostya/.rvm/gems/ree-1.8.7-2012.02/bin/ruby_noexec_wrapper:14

is it bug of rubygems-bundler or something else?

hm, seems i should use NOEXEC
and set it in .bashrc

it looks like a bug, but might be more RVM / project related, can you include gists of rvm info before and after?

hm, seems this happens only for projects with gemspec in Gemfile.

i cant predict behavior of bug :)
in different projects it raises or not, and different exceptions
Projects not using .rvmrc and gemsets.

that's interesting, in this case gemspec in Gemfile can fool the algorithm and tell it bundler should be loaded, but in such cases it should not be, did I got it right?

not sure that only gemspec, will test more

i got it, the bug appears when bundle in project was installed with option --path
like: bundle --path .bundle

--path issue is described in #26 - closing as duplicate

by the way, is there any way to add gem by default, when creating new or trusting gemset?
i adding my gem to lists .rvm/gemsets/default.gems and .rvm/gemsets/global.gems, but
when i create rvmrc ( rvm rvmrc create ree@some or trust new), gem list getting only:

bundler (1.1.4)
rake (0.9.2.2)
rubygems-bundler (1.0.2)
rvm (1.11.3.4)

this is related with question about system wide gems.

ok, seems i should install them into global gemset