[Rubygems-developers] PATCH: fix --gen-rdoc and --run-tests problems

Gavin Sinclair gsinclair at soyabean.com.au
Sun Apr 11 22:56:24 EDT 2004

On Sunday, April 11, 2004, 9:29:01 PM, Chad wrote:

> Thanks, Gavin.  This is  applied.  What was the change to --gen-rdoc?

Yeah, sort of.  --gen-rdoc was stuffed up by the conflicting types.
So this fixes it without touching any RDoc generation code.

> For all, you can now run:

> rake at

> ...to run all tests in RubyGems.

Oh no I can't:

  Required Gem 'Session' missing.
  We can attempt to install from the RubyGems Distribution,
  but installation may require admin privileges on your system.

  Install now from RubyGems distribution? [Yn]y
  Successfully installed session version 2.1.6
  Error in test/functional.rb: No such file to load -- io/nonblock

What's with this "io/nonblock" problem?

And guess what?  I even get the "Required Gem 'Session' missing"
message *after* I've installed it.  What does 'gem -Ll' say?

      Session::* offers a set of class for driving external progams via
      pipes.  It offers a significant abstraction over Open3::popen since
      stdout/stderr can be processed individually for each command.
      Additionally the exit_status of each command is made available.

# I'm worried about the difference between the gem name
# ("session-ruby-2.1.6") and the gem's name ("session").  I presume it's
# because the gem's *platform* is "ruby".  Now, what if I release a gem
# called "session-ruby" with no platform?

irb shows me the reason the gem is not detected, even though it's

  irb(main):001:0> require 'rubygems'
  => true
  irb(main):002:0> require_gem 'session'
  LoadError: No such file to load -- io/nonblock
        from /usr/local/lib/ruby/gems/1.8/gems/session-ruby-2.1.6/lib/session.rb:2:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/session-ruby-2.1.6/lib/session.rb:2
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:51:in `require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:51:in `require_gem'
        from (irb):2

So using the fact that "LoadError" is raised to infer that a certain
gem is not installed seems not to be reliable.


More information about the Rubygems-developers mailing list