Bug #2119: 'gem' method has problem when gems are in ~/.gem and no version requirement is given
http://redmine.ruby-lang.org/issues/show/2119

Author: Cezary Baginski
Status: Open, Priority: Normal
Category: core
ruby -v: 1.9.1 (2009-07-16 patchlevel 243)

$ruby -e "gem 'pg'; require 'pg'"
<internal:gem_prelude>:234:in `push_gem_version_on_load_path': Could not find RubyGem pg (>= 0) (Gem::LoadError)
	from <internal:gem_prelude>:14:in `gem'
	from -e:1:in `<main>'
$ ruby -e "gem 'pg', '0.8.0'; require 'pg'"

Workaround: add version requirement or call Gem.activate(...)

Sorry for not testing trunk/HEAD - it took me a while to work out how gem_prelude is used in the build system.
I'll do so as soon as I can (+14 hours). 

1.8.7 works, btw.


----------------------------------------
http://redmine.ruby-lang.org