Problems with fresh install of RubyGems on Ubuntu Linux: No such file to load -- rubygems/builder (LoadError)

Continuing to work with my RubyGems install issues, I setup a fresh installation of Ubuntu Linux to test it out. All the latest Ubuntu packages are installed ("hoary") with the available ruby packages (ruby1.8-dev, ruby1.8, libruby1.8, libruby1.8-d). I've attempted to install RubyGems, but get "No such file to load -- rubygems/builder (LoadError)". The full output is listed below. I believe this is related to my other problems on a sgi-solaris machine, if I could figure out a fix for this than I may be able to fix those as well. Thanks for any help or suggestions any one has to offer. This is a very frustrating problem that's affecting me in multiple environments and I have no idea where to start with it.

root@tabby:~/rubygems-0.8.4 # ruby -v
ruby 1.8.2 (2004-12-23) [i386-linux]
root@tabby:~/rubygems-0.8.4 # ruby setup.rb
---> bin
<--- bin
---> lib
---> lib/rubygems
<--- lib/rubygems
<--- lib
---> bin
<--- bin
---> lib
---> lib/rubygems
<--- lib/rubygems
<--- lib
rm -f InstalledFiles
---> bin
mkdir -p /usr/bin/
install generate_yaml_index.rb /usr/bin/
install update_rubygems /usr/bin/
install gem_server /usr/bin/
install gem /usr/bin/
<--- bin
---> lib
mkdir -p /usr/local/lib/site_ruby/1.8/
install rubygems.rb /usr/local/lib/site_ruby/1.8/
install ubygems.rb /usr/local/lib/site_ruby/1.8/
---> lib/rubygems
mkdir -p /usr/local/lib/site_ruby/1.8/rubygems
install timer.rb /usr/local/lib/site_ruby/1.8/rubygems
install specification.rb /usr/local/lib/site_ruby/1.8/rubygems
install source_index.rb /usr/local/lib/site_ruby/1.8/rubygems
install old_format.rb /usr/local/lib/site_ruby/1.8/rubygems
install command.rb /usr/local/lib/site_ruby/1.8/rubygems
install custom_require.rb /usr/local/lib/site_ruby/1.8/rubygems
install installer.rb /usr/local/lib/site_ruby/1.8/rubygems
install validator.rb /usr/local/lib/site_ruby/1.8/rubygems
install remote_installer.rb /usr/local/lib/site_ruby/1.8/rubygems
install config_file.rb /usr/local/lib/site_ruby/1.8/rubygems
install gem_runner.rb /usr/local/lib/site_ruby/1.8/rubygems
install format.rb /usr/local/lib/site_ruby/1.8/rubygems
install open-uri.rb /usr/local/lib/site_ruby/1.8/rubygems
install rubygems_version.rb /usr/local/lib/site_ruby/1.8/rubygems
install loadpath_manager.rb /usr/local/lib/site_ruby/1.8/rubygems
install doc_manager.rb /usr/local/lib/site_ruby/1.8/rubygems
install builder.rb /usr/local/lib/site_ruby/1.8/rubygems
install cmd_manager.rb /usr/local/lib/site_ruby/1.8/rubygems
install package.rb /usr/local/lib/site_ruby/1.8/rubygems
install version.rb /usr/local/lib/site_ruby/1.8/rubygems
install gem_commands.rb /usr/local/lib/site_ruby/1.8/rubygems
install user_interaction.rb /usr/local/lib/site_ruby/1.8/rubygems
<--- lib/rubygems
<--- lib

As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a while)...
...done.
No library stubs found.

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:26:in `require': No such file to load -- rubygems/builder (LoadError)
       from /usr/local/lib/site_ruby/1.8/rubygems.rb:58:in `manage_gems'
       from /root/rubygems-0.8.4/./post-install.rb:63:in `install_sources'
       from /root/rubygems-0.8.4/./post-install.rb:74:in `instance_eval'
       from setup.rb:583:in `instance_eval'
       from setup.rb:583:in `try_run_hook'
       from setup.rb:577:in `run_hook'
       from setup.rb:1315:in `exec_task_traverse'
       from setup.rb:1168:in `exec_install'
       from setup.rb:887:in `exec_install'
       from setup.rb:705:in `invoke'
       from setup.rb:674:in `invoke'
       from setup.rb:1352
root@tabby:~/rubygems-0.8.4 #

Thanks again,
Trevor

....

install builder.rb /usr/local/lib/site_ruby/1.8/rubygems

....

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:26:in `require':
No such file to load -- rubygems/builder (LoadError)
       from /usr/local/lib/site_ruby/1.8/rubygems.rb:58:in `manage_gems'

Hi Trevor!

I can't imagine why this would happen. From the looks of it, you've
successfully copied builder.rb to the right place. Would you mind
hacking pre-install.rb and adding something to print out $:?

Very weird stuff.

···

On Wed, 12 Jan 2005 04:13:57 +0900, Trevor <wenn0029@tc.umn.edu> wrote:

--

Chad Fowler
http://chadfowler.com

http://rubygems.rubyforge.org (over 50,000 gems served!)

Trevor wrote:

Continuing to work with my RubyGems install issues, I setup a fresh installation of Ubuntu Linux to test it out. All the latest Ubuntu packages are installed ("hoary") with the available ruby packages (ruby1.8-dev, ruby1.8, libruby1.8, libruby1.8-d). I've attempted to install RubyGems, but get "No such file to load -- rubygems/builder (LoadError)". The full output is listed below. I believe this is related to my other problems on a sgi-solaris machine, if I could figure out a fix for this than I may be able to fix those as well. Thanks for any help or suggestions any one has to offer. This is a very frustrating problem that's affecting me in multiple environments and I have no idea where to start with it.

You did not have zlibc installed at the time you compiled/installed ruby. This caused ruby to not have zlibc which is required in order to install rubygems.

Solution:

1. install zlibc (apt-get install zlibc)
2. recompile/reinstall ruby (zlibc must be installed when you do this)
3. install rubygems

Chad Fowler wrote:

...

install builder.rb /usr/local/lib/site_ruby/1.8/rubygems

...

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:26:in `require':
No such file to load -- rubygems/builder (LoadError)
      from /usr/local/lib/site_ruby/1.8/rubygems.rb:58:in `manage_gems'

Hi Trevor!

I can't imagine why this would happen. From the looks of it, you've
successfully copied builder.rb to the right place. Would you mind
hacking pre-install.rb and adding something to print out $:?

Very weird stuff.

I think the rubygems installer should check for the existance of zlibc and display a more meaningful error message.

Better yet, I think ruby should display an error message when zlibc is not availbe during installation of ruby 1.8.2+...but allow us to override by specifying an explicit option like ./configure --without-zlibc. This would prevent confusion with apps like rubygems.

Other than that, ruby and rubygems are the greatest thing since sliced bread!

···

On Wed, 12 Jan 2005 04:13:57 +0900, Trevor <wenn0029@tc.umn.edu> wrote:

Thursday <nospam@nospam.nospam.nospam.nospam.org> writes:

You did not have zlibc installed at the time you compiled/installed
ruby. This caused ruby to not have zlibc which is required in order to
install rubygems.

Solution:

1. install zlibc (apt-get install zlibc)
2. recompile/reinstall ruby (zlibc must be installed when you do this)
3. install rubygems

I had the same problem. I followed your instructions, and still get
the same error ("No such file to load -- rubygems/builder") after
running 'ruby setup.rb all' as root.

-=Eric

···

--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
    -- Blair Houghton.

Hi,

Thursday <nospam@nospam.nospam.nospam.nospam.org> writes:
> You did not have zlibc installed at the time you compiled/installed
> ruby. This caused ruby to not have zlibc which is required in order to
> install rubygems.
>
> Solution:
>
> 1. install zlibc (apt-get install zlibc)
> 2. recompile/reinstall ruby (zlibc must be installed when you do this)
> 3. install rubygems

I had the same problem. I followed your instructions, and still get
the same error ("No such file to load -- rubygems/builder") after
running 'ruby setup.rb all' as root.

I had the same problem (even after installing zlibc)...
With some help on #ruby-lang, it turned out I also needed
to install zlib1g and/or zlib1g-dev. I installed both,
(in addition to zlibc), rebuilt ruby, and the rubygems
install has now succeeded.

HTH,

Bill

···

From: "Eric Schwartz" <emschwar@pobox.com>