tag:help.rubygems.org,2010-01-19:/discussions/problems/445-gem-update-system-fails-undefined-method-path-for-gemmodule-nomethoderrorRubyGems.org: Discussion 2018-10-18T19:51:02Ztag:help.rubygems.org,2010-01-19:Comment/45141992010-12-31T23:43:55Z2010-12-31T23:43:56Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Exactly the same problem here.</p></div>koraktortag:help.rubygems.org,2010-01-19:Comment/45141992010-12-31T23:51:19Z2011-01-11T01:41:05Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Yep, also hit the same problem.</p>
<p>RubyGems 1.4.0 ChangeLog does not mention this issue.</p></div>postmodern.mod3tag:help.rubygems.org,2010-01-19:Comment/45141992011-01-01T00:02:42Z2011-01-18T21:00:35Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>From the readme, announcement email, and blog posts:</p>
<p>NOTE: Ruby 1.9 ships with rubygems and contains a very buggy<br>
"gem-prelude". It is a gem loading system that can interfere with
updating rubygems itself. We do NOT recommend you update to
rubygems<br>
1.4 if you're running ruby 1.9.x until we get that sorted out in
a<br>
future ruby release.</p>
<p>If you absolutely hate kittens and you <em>must</em> upgrade,
you're going to<br>
have to do something really hokey like:</p>
<pre>
<code>% alias ruby19="ruby19 --disable-gems"
% alias gem19="ruby19 --disable-gems -S gem"</code>
</pre>
<p>Even deleting the stock rubygems in 1.9 doesn't fix this
situation.</p></div>Ryan Davistag:help.rubygems.org,2010-01-19:Comment/45141992011-01-01T20:38:08Z2011-01-01T20:38:09Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Found out you can just re-install gem 1.3.7 and it will fix the
problem:</p>
<pre>
<code>sudo gem install rubygems-update -v 1.3.7</code>
</pre>
<p>props <a href=
"http://www.cloudspace.com/blog/2009/02/23/upgradingdowngrading-rubygems/">
here</a></p></div>mattstertag:help.rubygems.org,2010-01-19:Comment/45141992011-01-02T22:48:19Z2011-01-02T22:48:20Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Tried: sudo gem install rubygems-update -v 1.3.7<br>
And same error running: sudo gem update --system</p></div>Hackerontag:help.rubygems.org,2010-01-19:Comment/45141992011-01-02T23:34:06Z2011-01-18T21:00:37Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Just saying "tried" doesn't help us help you in the
slightest.</p></div>Ryan Davistag:help.rubygems.org,2010-01-19:Comment/45141992011-01-02T23:35:40Z2011-01-18T21:00:38Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>I just updated our UPGRADING doco to include downgrading
instructions. Thanks mattster.</p>
<p><a href=
"https://github.com/rubygems/rubygems/blob/master/UPGRADING.rdoc">https://github.com/rubygems/rubygems/blob/master/UPGRADING.rdoc</a></p>
<p>P.S. This captcha is stupid. Obviously 4 times four is
6teen.</p></div>Ryan Davistag:help.rubygems.org,2010-01-19:Comment/45141992011-01-07T04:32:10Z2011-01-07T04:32:12Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>In the downgrade instructions at the link Ryan just posted:</p>
<p>$ gem install rubygems-update -v 1.3.7 $ update_rubygems</p>
<p>The first command succeeds but the second one causes the
following:</p>
<p>
/usr/local/rvm/gems/ruby-1.9.2-p136/gems/rubygems-update-1.4.2/lib/rubygems/source_index.rb:62:in
<code>installed_spec_directories': undefined method</code>path' for
Gem:Module (NoMethodError)</p></div>Marktag:help.rubygems.org,2010-01-19:Comment/45141992011-01-07T22:49:57Z2011-01-07T22:49:59Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>I think what Hackeron was trying to say is that downgrading no
longer works:</p>
<pre>
<code> bash-3.2# gem install rubygems-update -v 1.3.7
Successfully installed rubygems-update-1.3.7
1 gem installed
Installing ri documentation for rubygems-update-1.3.7...
Installing RDoc documentation for rubygems-update-1.3.7...
bash-3.2# update_rubygems
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rubygems-update-1.4.2/lib/rubygems/source_index.rb:62:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)</code>
</pre>
<p>As it is, rubygems 1.4.x essentially amounts to setting up a
booby trap for every 1.9.2 user who happens to type "gem update".
I'm not sure why you seem to believe that pushing out a gem like
that is an OK thing to do. Yes, the bug is in 1.9.2, but this
approach to addressing that bug still strikes me as a bit
irresponsible.</p></div>Carsten Bormanntag:help.rubygems.org,2010-01-19:Comment/45141992011-01-08T09:19:49Z2011-01-18T21:00:39Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Try running <code>update_rubygems</code> without rubygems:</p>
<pre>
<code>ruby --disable-gems -S update_rubygems</code>
</pre>
<p>and let me know if that helps.</p></div>Ryan Davistag:help.rubygems.org,2010-01-19:Comment/45141992011-01-08T13:08:41Z2011-01-08T13:08:42Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Unfortunately, same error:</p>
<pre>
<code> bash-3.2# ruby --disable-gems -S update_rubygems
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rubygems-update-1.3.7/lib/rubygems/source_index.rb:68:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)</code>
</pre>
<p>I made sure I only have the rubygems-update v1.3.7
installed.</p>
<pre>
<code> bash-3.2# gem list rubygems
*** LOCAL GEMS ***
rubygems-update (1.3.7)
bash-3.2#</code>
</pre></div>Carsten Bormanntag:help.rubygems.org,2010-01-19:Comment/45141992011-01-08T20:23:02Z2011-01-08T20:23:02Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Same result for me as well.</p></div>Marktag:help.rubygems.org,2010-01-19:Comment/45141992011-01-09T06:42:05Z2011-01-09T06:42:06Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>I totally agree with Carsten Bormann:</p>
<p>"As it is, rubygems 1.4.x essentially amounts to setting up a
booby trap for every 1.9.2 user who happens to type "gem update".
I'm not sure why you seem to believe that pushing out a gem like
that is an OK thing to do. Yes, the bug is in 1.9.2, but this
approach to addressing that bug still strikes me as a bit
irresponsible."</p>
<p>This could have been handled much better.</p></div>Miketag:help.rubygems.org,2010-01-19:Comment/45141992011-01-09T07:19:31Z2011-01-18T21:00:40Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>OK. I don't know how to say it any plainer than this:</p>
<p>DO NOT UPGRADE IF YOU ARE ON 1.9!!!</p>
<p>Everything I see above says that <em>none</em> of you have
upgraded to 1.4.x. You've only attempted to and failed. Use
<code>gem -v</code> to confirm. All this alarm about "booby traps"
and "irresponsibility" is blowing the whole thing out of
proportion.</p>
<p>That said, anyone who did, went WAY out of their way to get it
upgraded (the only successful upgrade I've seen involves a fully
manual install by running setup.rb with the above required
flags).</p>
<p>I've updated UPGRADING.rdoc with downgrade instructions that
work for r1.9.2+rg1.4.x.</p></div>Ryan Davistag:help.rubygems.org,2010-01-19:Comment/45141992011-01-09T07:35:34Z2011-01-09T07:35:36Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><blockquote>
<p>Everything I see above says that none of you have upgraded to
1.4.x.</p>
</blockquote>
<p>Everything I see says the we upgraded to 1.4.x, then failed
trying to update rubygems. Then we "downgraded" rubygems (per your
instructions) and updating rubygems still failed.</p>
<p>So, yes we have attempted and failed. That's why we have been
posting.</p>
<blockquote>
<p>DO NOT UPGRADE IF YOU ARE ON 1.9!!!</p>
</blockquote>
<p>If we weren't on 1.9 then from my understanding we wouldn't be
having this discussion. We didn't have any problems updating
rubygems until we were on 1.9.<br>
The "downgrade" instructions that you have been pointing us to
imply (if they don't say it directly) that when we are on 1.9, if
we downgrade to 1.3.7 of rubygems, then we can update rubygems. If
this is correct then that implication is wrong because I (and at
least one other) experienced the same error following those
instructions.</p>
<p>So if my understanding (or misunderstanding) is wrong as laid
out above please correct me. It would be preferable for a few
reasons if you did so without yelling.</p>
<p>Thanks</p></div>Marktag:help.rubygems.org,2010-01-19:Comment/45141992011-01-09T08:21:31Z2011-01-18T21:00:41Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><blockquote>
<p>Everything I see says the we upgraded to 1.4.x, then failed
trying to update rubygems. Then we "downgraded" rubygems (per your
instructions) and updating rubygems still failed.</p>
</blockquote>
<p>No, you didn't upgrade to 1.4.x. You installed rubygems-update v
1.4.x. There is a distinct difference there. You haven't affected
your rubygems itself, just installed the gem we used to update....
At this stage, nothing is wrong (other than not being able to
update to 1.4.x).</p>
<blockquote>
<p>So, yes we have attempted and failed. That's why we have been
posting.</p>
</blockquote>
<p>And this is a known and documented issue. There is nothing we
can or will do about it for 1.4.x.</p>
<blockquote>
<p>The "downgrade" instructions that you have been pointing us to
imply (if they don't say it directly) that when we are on 1.9, if
we downgrade to 1.3.7 of rubygems, then we can update rubygems.</p>
</blockquote>
<p>Absolutely not. The downgrade instructions are for those who
actually <em>did</em> upgrade to rubygems 1.4.x on ruby 1.9.2. I
wouldn't be saying "DO NOT UPGRADE IF YOU ARE ON RUBY 1.9" and
trying to imply that you should at the same time. That doesn't make
any sense.</p>
<p>So, just don't. Luckily, it is a lot harder to upgrade than some
people were implying and this issue isn't half as huge as some say
it is. Stick to the stock 1.3.7 and wait for us to deal with the
gem_prelude issue is 1.9.2.</p></div>Ryan Davistag:help.rubygems.org,2010-01-19:Comment/45141992011-01-09T08:27:21Z2011-01-09T08:27:21Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Well, "booby-trapped" is indeed a bit strong. My Mac didn't
explode.</p>
<p>Stiil, the function of "gem update" is currently out of order.
People find out by getting an error message from a routine "gem
update" and then have to hunt down instructions to fix the problem.
Maybe not "irresponsible" in the North Korea meaning of the word,
but not very nice either.</p>
<p>Is it possible to label the 1.4 versions as 1.8 only until the
problem is resolved in 1.9.x?</p></div>Carsten Bormanntag:help.rubygems.org,2010-01-19:Comment/45141992011-01-11T01:35:24Z2011-01-11T01:35:25Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Hi Ryan,</p>
<p>Emotions aside, if I understand you correctly, it is understood
that "gem update" as of now will fail to update RubyGems to 1.4.2
on systems running Ruby 1.9.2. On my systems "gem -v" is continuing
to return 1.3.7, so at worst I'm not getting the benefit of
whatever changed between the two, but there aren't any dire side
effects to be concerned about. Correct?</p></div>Jim Tobintag:help.rubygems.org,2010-01-19:Comment/45141992011-01-16T16:22:18Z2011-01-16T16:22:22Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Everyone relax. I got the same NoMethodError. I'm using RVM.</p>
<pre>
<code>gem -v # still on 1.3.7, as Ryan Davis explained above.</code>
</pre>
<p>So, nothing actually happened when I ran <code>gem update
--system</code> because it encountered an error before it could
install <code>rubygems-update-1.4.2</code>.</p>
<p>So, you don't have to do anything. Just stop trying to update
for now and continue as normal. You can still do <code>gem
update</code> successfully.</p>
<p>I wanted to delete the files, so I did the following:</p>
<p><strong>WARNING</strong>: Leaving the files where they are is
probably safer. I don't think they're necessary, but I could be
wrong.</p>
<pre>
<code># Find files to delete. Your $GEM_PATH may differ.
find ~/.rvm/ -name 'rubygems-update*'
# Delete them.
rm "$HOME/.rvm/gems/ruby-1.9.2-p0@global/specifications/rubygems-update-1.4.2.gemspec"
rm "$HOME/.rvm/gems/ruby-1.9.2-p0@global/cache/rubygems-update-1.4.2.gem"
/Users/matt/.rvm//gems/ruby-1.9.2-p0@global/cache/rubygems-update-1.4.2.gem
rm -r "$HOME/.rvm/gems/ruby-1.9.2-p0@global/gems/rubygems-update-1.4.2"</code>
</pre></div>Matt Di Pasqualetag:help.rubygems.org,2010-01-19:Comment/45141992011-01-16T21:11:25Z2011-01-18T21:00:42Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Oh look. A sane/polite person! :P</p>
<p>Thanks for the voice of reason Matt. Just wanted to point out
that you should be fine with a simple <code>gem uninstall
rubygems-update</code>... it is just a gem at that point. Rvm might
make that a little more messy (not sure why you have it twice for
example).</p></div>Ryan Davistag:help.rubygems.org,2010-01-19:Comment/45141992011-03-05T10:51:58Z2011-09-23T14:59:24Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Any news on this subject?</p></div>Marcus Antoniustag:help.rubygems.org,2010-01-19:Comment/45141992011-03-23T23:59:51Z2011-03-23T23:59:52Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>I'd like to skip the 1.9.X issues with rubygems-update. I'd like
to install Ruby 1.87 instead. Gem updates seems to work fine with
this version. However, I can find this version on the Ruby
downloads page.<br>
Liz</p></div>Liz tag:help.rubygems.org,2010-01-19:Comment/45141992011-04-15T23:52:00Z2011-04-15T23:52:01Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>I had to uninstall ruby-1.9.2-p0 entirely. :-(<br>
Then sudo rm -rf the ruby-1.9.2-p0/ directory.</p></div>rico.collinstag:help.rubygems.org,2010-01-19:Comment/45141992011-04-20T19:50:26Z2011-04-20T19:50:27Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Using CentOS 5.4 I did a yum install ruby (1.8.5-5.el5_4.8)<br>
I loaded the default version of rubygems (1.7.2)</p>
<p>I get an error when running ruby setup.rb. Any suggestions?</p>
<p>[root@vizitdb rubygems-1.7.2]# ruby setup.rb
./lib/rubygems/custom_require.rb:53: warning: parenthesize
argument(s) for future version
./lib/rubygems/custom_require.rb:56:in <code>require': undefined
method</code>end_with?' for <a href="String">no such file to load
-- Win32API</a> (NoMethodError)</p>
<pre>
<code> from ./lib/rubygems/config_file.rb:55
from ./lib/rubygems/custom_require.rb:36:in `gem_original_require'
from ./lib/rubygems/custom_require.rb:36:in `require'
from ./lib/rubygems/gem_runner.rb:8
from ./lib/rubygems/custom_require.rb:36:in `gem_original_require'
from ./lib/rubygems/custom_require.rb:36:in `require'
from setup.rb:25</code>
</pre></div>Paultag:help.rubygems.org,2010-01-19:Comment/45141992011-04-20T22:07:12Z2011-04-20T22:07:12Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Paul, that looks like a completely separate issue. Please don't
post it here. Post it on a new issue.</p>
<p>In fact, I'm closing this issue so this doesn't keep going on...
This issue is long dead.</p></div>Ryan Davistag:help.rubygems.org,2010-01-19:Comment/45141992011-04-25T15:20:32Z2011-04-25T15:20:32Zgem update --system fails: undefined method `path' for Gem:Module (NoMethodError)<div><p>Sorry, this is my first post to this group. I entered a new
issue.</p>
<p>Paul Bourget<br>
Isabella Products</p>
<p>-----Original Message----- From: zenspider<br>
[mailto:<a href=
"mailto:tender+dd61f1afca2d4f6c78973dc31c84598a71761e43c@tenderapp.com">tender+dd61f1afca2d4f6c78973dc31c84598a71761e43c@tenderapp.com</a>]
Sent: Wednesday, April 20, 2011 6:08 PM<br>
To: Paul Bourget<br>
Subject: Re: gem update --system fails: undefined method `path'
for<br>
Gem:Module (NoMethodError) [Problems]</p></div>Paul Bourget