[Bug #1163] gem_prelude raise NoMethodError if require uninsalled gem with version


#1

Bug #1163: gem_prelude raise NoMethodError if require uninsalled gem
with version.
http://redmine.ruby-lang.org/issues/show/1163

e$B5/I<<Te(B: Kyosuke MOROHASHI
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-darwin9]

geme$B$re(BKernel#geme$B$GFI$_9~$`:]!“e(B
(1)e$B%$%s%9%H!<%k$5$l$F$$$J$$e(Bgeme$B$G!”$+$De(B
(2)e$B%P!<%8%g%s$r;XDj$7$?>l9g$Ke(B

NoMethodErrore$B$,H/@8$7$^$9!#$3$3$Oe(BGem::LoadErrore$B$G$"$k$Y$-$G$O$J$$$G$7$g$&$+!#e(B
e$B$48!F$$*4j$$$7$^$9!#e(B

e$B%$%s%9%H!<%k$5$l$F$$$J$$e(Bgeme$B$r%P!<%8%g%sIU$-$GFI$_9~$$He(BNoMethodError $ ruby19 -ve "p gem 'rackie', '>= 1.0.0'" ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-darwin9] <internal:gem_prelude>:249:inpush_gem_version_on_load_path’: undefined
method <=>' for nil:NilClass (NoMethodError) from <internal:gem_prelude>:14:ingem’
from -e:1:in `’

e$B%$%s%9%H!<%k$5$l$F$$$J$$e(Bgeme$B$rFI$_9~$`$He(BGem::LoadError

$ ruby19 -ve “p gem ‘rackie’”
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-darwin9]
internal:gem_prelude:234:in push_gem_version_on_load_path': Could not find RubyGem rackie (>= 0) (Gem::LoadError) from <internal:gem_prelude>:14:ingem’
from -e:1:in `’[telperion:~/tmp/rails/actionpack]
19:47# moro[1]$

e$B%$%s%9%H!<%k$5$l$F$$$ke(Bgeme$B$r%P!<%8%g%sIU$-$GFI$_9~$$He(BGem::LoadError $ ruby19 -ve "p gem 'rack', '>= 1.0.0'" ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-darwin9] /Users/moro/opt/ruby191/lib/ruby19/1.9.1/rubygems.rb:636:inreport_activate_error’: RubyGem version error: rack(0.9.1 not >= 1.0.0)
(Gem::LoadError)
from /Users/moro/opt/ruby191/lib/ruby19/1.9.1/rubygems.rb:141:in
activate' from /Users/moro/opt/ruby191/lib/ruby19/1.9.1/rubygems.rb:49:ingem’
from internal:gem_prelude:261:in
push_gem_version_on_load_path' from <internal:gem_prelude>:14:ingem’
from -e:1:in `’[telperion:~/tmp/rails/actionpack]


#2

e$B%A%1%C%He(B #1163 e$B$,99?7$5$l$^$7$?!#e(B (by Akira M.)

+1 for this patch.
e$BF1$8LdBj$G%O%^$j$^$7$?!#$b$m$O$7$5$s$NDs0F$I$*$j$N;EMM$G$h$$$H;W$$$^$9!#e(B

http://redmine.ruby-lang.org/issues/show/1163


#3

e$B%A%1%C%He(B #1163 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r23208.

http://redmine.ruby-lang.org/issues/show/1163