https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112009-07-18T14:04:37ZRuby Issue Tracking SystemBackport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=48572009-07-18T14:04:37Zwycats (Yehuda Katz)wycats@gmail.com
<ul></ul><p>=begin<br>
What exactly is the behavior you're expecting?<br>
=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=48602009-07-18T15:23:28Zgodfat (Lin Jen-Shin)godfat@godfat.org
<ul></ul><p>=begin<br>
Sorry for not being clear. What I would like to do is setting up<br>
an rubygems environment that isn't affected by system gems.<br>
I am doing this by setting gem path in ruby runtime, i.e.<br>
<code>Gem.use_paths' Then any later </code>require' should search only paths<br>
I assigned, but not any other path (e.g. system gem path).</p>
<p>This worked in 1.8 but not in 1.9.</p>
<p>I can setup gem path correctly in 1.9, but `require'<br>
didn't follow the path it should follow. It still searched<br>
the original path. Setting $GEM_PATH has no problem,<br>
but I don't want to switch $GEM_PATH in runtime.</p>
<p>Thanks for your attention.<br>
Cheers,</p>
<p>=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=48632009-07-18T20:28:11Zwycats (Yehuda Katz)wycats@gmail.com
<ul></ul><p>=begin<br>
@lin Carl Lerche and I are working on something along these lines right now that will be used by Rails 3, but available as a separate library. Hopefully much of that library, and the fixes we needed in order to achieve what we did, will be merged back into Rubygems. Our code is focused on allowing you to have a Rubygems environment in an application that has only the gems needed for that application (including dependencies). Our solution also doesn't require the rubygems runtime to run your application.</p>
<p>I posted some preliminaries at <a href="http://yehudakatz.com/2009/07/08/rails-bundling-revisited/" class="external">http://yehudakatz.com/2009/07/08/rails-bundling-revisited/</a></p>
<p>More details are forthcoming next week.<br>
=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=49062009-07-22T17:13:15Zadamsalter (Adam Salter)adam.q.salter@gmail.com
<ul></ul><p>=begin<br>
I'm seeing this issue as well.<br>
Would love to see some movement here...</p>
<p>I basically install all my gems without using 'sudo'... i.e. locally<br>
and it seems that what used to be fine in Ruby 1.8 now doesn't work for 1.9</p>
<p>I 'gem install desired_gem' and get the error described above:<br>
require 'desired_gem'<br>
no such file to load -- desired_gem</p>
<p>of course the work around is to 'sudo gem install desired_gem' but this is less than ideal.<br>
=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=49072009-07-22T17:19:26Zadamsalter (Adam Salter)adam.q.salter@gmail.com
<ul></ul><p>=begin<br>
As described above the other solution is to:<br>
export GEM_PATH=/Users/adam/.gem/ruby/1.9.1</p>
<p>This is definately a bug in current rubygems (1.3.5) with ruby 1.9<br>
=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=49312009-07-23T14:53:00Zadamsalter (Adam Salter)adam.q.salter@gmail.com
<ul></ul><p>=begin<br>
I've found that my suggestion above isn't completely reliable, I still get gems unable to be found in some cases.</p>
<p>The following seems to work 100% of the time:</p>
<p>export GEM_HOME=/opt/local/lib/ruby1.9/gems/1.9.1<br>
export GEM_PATH=$GEM_HOME:/Users/adam/.gem/ruby/1.9.1</p>
<p>obviously if you do switch back to 1.8:</p>
<p>unset GEM_HOME<br>
unset GEM_PATH<br>
=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=56932009-09-09T00:37:20Zgodfat (Lin Jen-Shin)godfat@godfat.org
<ul></ul><p>=begin<br>
I am not sure why, but calling <code>Gem.source_index' would change </code>Gem.path' 's value, and cause<br>
`Gem.use_path' be a private method.</p>
<p>It seems that there's some magic in Gem.source_index,<br>
and that modified Gem.path and cause this bug.</p>
<p>This is tested with trunk r24791.<br>
=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=62542009-10-16T10:42:00Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>drbrain (Eric Hodel)</i></li></ul><p>=begin</p>
<p>=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=68972009-11-19T17:00:45Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>=begin<br>
I also reported this problem to RubyGems bug tracker: <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=27216&group_id=126&atid=575" class="external">http://rubyforge.org/tracker/index.php?func=detail&aid=27216&group_id=126&atid=575</a><br>
=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=69002009-11-19T18:50:08Zyugui (Yuki Sonoda)yugui@yugui.jp
<ul></ul><p>=begin<br>
2009/7/13 Lin Jen-Shin <a href="mailto:redmine@ruby-lang.org" class="email">redmine@ruby-lang.org</a>:</p>
<blockquote>
<p>$ gem which rack<br>
(checking gem rack-1.0.0 for rack)<br>
/home/photos/.gem/ruby/1.9.1/gems/rack-1.0.0/lib/rack.rb</p>
<p>$ ruby -ve 'gem "rack"'<br>
ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]<br>
<a href="internal:gem_prelude" class="external">internal:gem_prelude</a>:234:in <code>push_gem_version_on_load_path': Could not find RubyGem rack (>= 0) (Gem::LoadError) from <internal:gem_prelude>:14:in </code>gem'<br>
from -e:1:in `'</p>
</blockquote>
<p>This is a bug of gem_prelude.rb. This will be fixed the next patch<br>
level release of Ruby 1.9.1.<br>
Now I'm trying releasing it within a week.</p>
<p>But the fixed version of gem_prelude works fine for only the default<br>
path to user gem, i.e. ~user/.gem/ruby/1.9.1/<br>
This lightweight version of gem loading mechanism does not have way to<br>
reflect gemrc.<br>
This is because gemrc is a YAML and YAML parser is too large to load<br>
at Ruby starting. Do you have any idea?</p>
<p>-- Yuki Sonoda (Yugui)</p>
<p>=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=69062009-11-19T23:08:31Zgodfat (Lin Jen-Shin)godfat@godfat.org
<ul></ul><p>=begin<br>
Good to know! It's a lot better than current state.<br>
Many thanks!</p>
<p>For .gemrc's part, what I've come up now is:<br>
a: Read .gem_preluderc with subset of YAML instead,<br>
for example, only `key: value' is supported.</p>
<p>b: Read .gemrc and ignore all nested structure.</p>
<p>c: Change the fact that .gemrc using YAML,<br>
break compatibility (if any)</p>
<p>I guess option "c" is the worst. "a" introduces another<br>
rc file and duplicating some options with .gemrc,<br>
annoying and confusing. "b" would surprise people<br>
that some options are ignored, but I am not sure if<br>
there're many options have nested structure?</p>
<p>cheers,<br>
=end</p> Backport191 - Backport #1773: Gem path doesn't honor user gem?https://bugs.ruby-lang.org/issues/1773?journal_id=180402011-06-17T09:28:28Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Backport</i></li><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>I think this is largely a bug of ruby 1.9.1's gem_prelude. Ruby 1.9.2's gem prelude works better, please reopen if you can reproduce the issue there.</p>