Something very strange has happened for me, and I'd like to know if I'm
doing something stupid.

I wanted to install activerecord, and to do so I thought it would be a good
idea to install rubygems to do the work for me. So I downloaded
rubygems-0.9.2 from http://rubyforge.org/frs/?group_id=126&release_id=9501,
did "ruby setup.rb" as root. This seemed to start OK but then gave some
errors:

    ...
    setup.rb:18:15: Couldn't find File. Assuming it's a module

    test/functional.rb:158:0: Unrecognized directive 'section'
    hook /v/build/rubygems-0.9.2/./post-install.rb failed:
    undefined local variable or method `size' for #<SM::ToFlow:0xb7a6d230>
    Try 'ruby setup.rb --help' for detailed usage.

I then tried "gem install activerecord" and it failed immediately:

    ERROR:  While executing gem ... (Gem::GemNotFoundException)
        Could not find activerecord (> 0) in any repository

even though "gem query --remote --name-matches active" worked and showed the
gem. The full transcript of what I did is shown below.

This is running under CentOS-4.4 which currently has only ruby 1.8.1:

[root@localhost rubygems-0.9.2]# cat /etc/redhat-release
CentOS release 4.4 (Final)
[root@localhost rubygems-0.9.2]# ruby -v
ruby 1.8.1 (2003-12-25) [i386-linux-gnu]

Now, while I was composing this mail, I tried again, firstly with a smaller
package:

[root@localhost rubygems-0.9.2]# gem install redcloth
Successfully installed RedCloth-3.0.4
[root@localhost rubygems-0.9.2]# gem install activerecord
Install required dependency activesupport? [Yn]  y
Successfully installed activerecord-1.15.2
Successfully installed activesupport-1.4.1
Installing ri documentation for activerecord-1.15.2...
Installing ri documentation for activesupport-1.4.1...
Installing RDoc documentation for activerecord-1.15.2...
ERROR:  While executing gem ... (NoMethodError)
    undefined method `find_module_named' for nil:NilClass
[root@localhost rubygems-0.9.2]#

So it got further this time, but still bombed out in the end.

Any suggestions as to what I should do? I don't find this problem listed on
the rubygems FAQ at http://docs.rubygems.org/read/book/3 and neither do I
see any requirements saying that rubygems needs ruby version X.X.X to work.

Thanks,

Brian.

-----------------------------------------------------------------------------
[root@localhost rubygems-0.9.2]# ruby setup.rb
---> bin
<--- bin
---> lib
---> lib/rbconfig
<--- lib/rbconfig
---> lib/rubygems
<--- lib/rubygems
<--- lib
---> bin
<--- bin
---> lib
---> lib/rbconfig
<--- lib/rbconfig
---> lib/rubygems
<--- lib/rubygems
<--- lib
rm -f InstalledFiles
---> bin
mkdir -p /usr/bin/
install gemwhich /usr/bin/
install index_gem_repository.rb /usr/bin/
install gemri /usr/bin/
install gem /usr/bin/
install update_rubygems /usr/bin/
install gem_server /usr/bin/
install gemlock /usr/bin/
install gem_mirror /usr/bin/
<--- bin
---> lib
mkdir -p /usr/lib/site_ruby/1.8/
install ubygems.rb /usr/lib/site_ruby/1.8/
install rubygems.rb /usr/lib/site_ruby/1.8/
install gemconfigure.rb /usr/lib/site_ruby/1.8/
---> lib/rbconfig
mkdir -p /usr/lib/site_ruby/1.8/rbconfig
install datadir.rb /usr/lib/site_ruby/1.8/rbconfig
<--- lib/rbconfig
---> lib/rubygems
mkdir -p /usr/lib/site_ruby/1.8/rubygems
install version.rb /usr/lib/site_ruby/1.8/rubygems
install installer.rb /usr/lib/site_ruby/1.8/rubygems
install command.rb /usr/lib/site_ruby/1.8/rubygems
install cmd_manager.rb /usr/lib/site_ruby/1.8/rubygems
install source_info_cache.rb /usr/lib/site_ruby/1.8/rubygems
install rubygems_version.rb /usr/lib/site_ruby/1.8/rubygems
install gem_runner.rb /usr/lib/site_ruby/1.8/rubygems
install doc_manager.rb /usr/lib/site_ruby/1.8/rubygems
install open-uri.rb /usr/lib/site_ruby/1.8/rubygems
install custom_require.rb /usr/lib/site_ruby/1.8/rubygems
install dependency_list.rb /usr/lib/site_ruby/1.8/rubygems
install remote_fetcher.rb /usr/lib/site_ruby/1.8/rubygems
install server.rb /usr/lib/site_ruby/1.8/rubygems
install config_file.rb /usr/lib/site_ruby/1.8/rubygems
install specification.rb /usr/lib/site_ruby/1.8/rubygems
install source_index.rb /usr/lib/site_ruby/1.8/rubygems
install remote_installer.rb /usr/lib/site_ruby/1.8/rubygems
install gem_commands.rb /usr/lib/site_ruby/1.8/rubygems
install timer.rb /usr/lib/site_ruby/1.8/rubygems
install builder.rb /usr/lib/site_ruby/1.8/rubygems
install user_interaction.rb /usr/lib/site_ruby/1.8/rubygems
install security.rb /usr/lib/site_ruby/1.8/rubygems
install gem_openssl.rb /usr/lib/site_ruby/1.8/rubygems
install source_info_cache_entry.rb /usr/lib/site_ruby/1.8/rubygems
install gem_open_uri.rb /usr/lib/site_ruby/1.8/rubygems
install format.rb /usr/lib/site_ruby/1.8/rubygems
install old_format.rb /usr/lib/site_ruby/1.8/rubygems
install validator.rb /usr/lib/site_ruby/1.8/rubygems
install package.rb /usr/lib/site_ruby/1.8/rubygems
<--- lib/rubygems
<--- lib
  Successfully built RubyGem
  Name: sources
  Version: 0.0.1
  File: sources-0.0.1.gem
Removing old RubyGems RDoc and ri...
Installing rubygems-0.9.2 ri...

setup.rb:18:15: Couldn't find File. Assuming it's a module

test/functional.rb:158:0: Unrecognized directive 'section'
hook /v/build/rubygems-0.9.2/./post-install.rb failed:
undefined local variable or method `size' for #<SM::ToFlow:0xb7a6d230>
Try 'ruby setup.rb --help' for detailed usage.
[root@localhost rubygems-0.9.2]# gem install activerecord
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (Gem::GemNotFoundException)
    Could not find activerecord (> 0) in any repository
[root@localhost rubygems-0.9.2]# gem query --remote --name-matches active

*** REMOTE GEMS ***
Bulk updating Gem source index for: http://gems.rubyforge.org

active_acl (0.2.1, 0.2.0)
    Provides an unintrusive, scalable and very flexible approach to fine
    grained access control.

activedirectory (0.9.3)
    Module for easy interaction with Active Directory servers.

activemerchant (1.0.2, 1.0.1, 1.0.0)
    Framework and tools for dealing with credit card transactions.

activerdf (1.3.1, 1.3, 1.2.3, 1.2.2, 1.2.1, 1.2, 1.1, 1.0)
    Offers object-oriented access to RDF (with adapters to several
    datastores).

activerdf_rdflite (1.2.3, 1.2.2, 1.2.1, 1.2, 1.1, 1.0)
    an RDF database for usage in ActiveRDF (based on sqlite3)

activerdf_redland (1.1, 1.0)
    ActiveRDF adapter to Redland RDF store

activerdf_rules (0.0.2, 0.0.1)
    A rulebase and forward chaining production system for activerdf
    databases

activerdf_sesame (0.2.2, 0.2.1, 0.2, 0.1)
    jruby adapter to sesame2 datastore (for usage in ActiveRDF)

activerdf_sparql (1.3, 1.2.1, 1.2, 1.1, 1.0)
    ActiveRDF adapter to SPARQL endpoint

activerecord (1.15.2, 1.15.1, 1.15.0, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14.0, 1.13.2, 1.13.1, 1.13.0, 1.12.2, 1.12.1, 1.11.1, 1.11.0, 1.10.1, 1.10.0, 1.9.1, 1.9.0, 1.8.0, 1.7.0, 1.6.0, 1.5.1, 1.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0, 1.0.0, 0.9.5, 0.9.4, 0.9.3, 0.9.2, 0.9.1, 0.9.0, 0.8.4, 0.8.3, 0.8.2, 0.8.1, 0.8.0, 0.7.6, 0.7.5)
    Implements the ActiveRecord pattern for ORM.

ActiveRecord-JDBC (0.2.2, 0.2.1, 0.0.1)
    JDBC support for ActiveRecord. Only usable within JRuby

activerecord-mimer (0.0.4, 0.0.3, 0.0.2, 0.0.1)
    Mimer support for ActiveRecord.

activesalesforce (1.1.0, 1.0.0, 0.6.3, 0.6.2, 0.6.1, 0.6.0, 0.5.9, 0.5.8, 0.5.7, 0.5.6, 0.5.5, 0.5.4, 0.5.3, 0.5.2, 0.5.1, 0.5.0, 0.4.9, 0.4.8, 0.4.7, 0.4.6, 0.4.5, 0.4.4, 0.4.3, 0.4.2, 0.4.0, 0.3.9, 0.3.8, 0.3.7, 0.3.6, 0.3.4, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.9, 0.2.8, 0.2.7, 0.2.6, 0.2.5, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.9, 0.1.8, 0.1.7, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1, 0.1.0, 0.0.9, 0.0.8, 0.0.7, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2)
    ActiveSalesforce (ASF) is a Rails connection adapter that provides
    direct access to Salesforce.com hosted data and metadata via the
    ActiveRecord model layer. Objects, fields, and relationships are all
    auto surfaced as active record attributes and rels.

activesambaldap (0.0.2, 0.0.1)
    ActiveSambaLdap is a library and a management tool for Samba + LDAP
    environment.

activespec (0.1)
    Ruby Specification Library

activesupport (1.4.1, 1.4.0, 1.3.1, 1.3.0, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0)
    Support and utility classes used by the Rails framework.

activewarehouse (0.2.0, 0.1.0)
    Build data warehouses with Rails.

activewarehouse-etl (0.5.2, 0.5.1, 0.5.0, 0.4.0, 0.3.0, 0.2.0, 0.1.0)
    Pure Ruby ETL package.

hyperactive (0.2.5, 0.2.4, 0.2.3, 0.2.2, 0.1.1, 0.1.0)
    A base class for persistent objects that uses archipelago for
    persistence. Useful for Ruby on Rails models for example.

ruby-activeldap (0.8.1, 0.8.0, 0.7.4, 0.7.3, 0.7.2, 0.7.1, 0.7.0, 0.6.0, 0.5.9, 0.5.8, 0.5.7, 0.5.5, 0.5.4, 0.5.3, 0.5.2, 0.5.1, 0.5.0, 0.4.4, 0.4.3, 0.4.2, 0.4.1)
    Ruby/ActiveLdap is a object-oriented API to LDAP

ruby-activeldap-debug (0.7.4, 0.7.3, 0.7.2, 0.7.1, 0.7.0, 0.6.0, 0.5.9, 0.5.8, 0.5.7, 0.5.6, 0.5.5)
    Ruby/ActiveLDAP is a object-oriented API to LDAP
[root@localhost rubygems-0.9.2]#