Forum: Ruby on Rails ubygems.rb hack

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
(Guest)
on 2009-05-09 19:19
(Received via mailing list)
I just updated my Ubuntu Hardy Heron (8.04) to Ruby 1.8.7 and Rails
2.3.2, and I've managed to get stuck with

                          ruby: no such file to load -- ubygems
(LoadError)

Investigating further, it appears that this is a hack someone added
'long time ago' to allow

                          ruby -rubygems blah

to work. Before I did the upgrade, there was a file in there named
ubygems.rb which only had a "require 'rubygems'" line in it.

Most of the commentary on this  subject revolved around Doze or
Cygwin, and the recommendation was to unset $RUBYOPT

I did so, and now it says RubyGems is not installed. Setting it again
returns me to the ubygems error.

What's the right way to fix this? I had already updated rubygems to
1.3.3, so

                        sudo gem update --system

does not fix it.

I could easily recreate the hack by installing a file ubygems.rb,
but... blyecch!

Thanks in advance!

-- Don W.
(Guest)
on 2009-05-09 20:15
(Received via mailing list)
On May 9, 8:42 am, "removed_email_address@domain.invalid" 
<removed_email_address@domain.invalid> wrote:
>
> 1.3.3, so
>
>                         sudo gem update --system
>
> does not fix it.
>
> I could easily recreate the hack by installing a file ubygems.rb,
> but... blyecch!
>

UPDATE: It appears that it is Ruby that is having the issue with the
hack. I called the old 1.8.6-p111 ruby that was the previous standard
install (thankfully, I'd renamed rather than overwriting!), and it
works. I'd still like to know the proper way to fix it, but I can limp
along with this.

There is a ubygems.rb file in /usr/lib/ruby/1.8, as well as one in the
gem directory for rubygems-1.3.3. :-\
This topic is locked and can not be replied to.