Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby: No such file to load -- ubygems (LoadError)

Reply
Thread Tools

Ruby: No such file to load -- ubygems (LoadError)

 
 
Brian Takita
Guest
Posts: n/a
 
      05-11-2005
Hello,

I am running the one-click ruby verion 1.8.2-15 on Windows XP.

When I try to run a ruby script, I get this error, Ruby: No such file
to load -- ubygems (LoadError).

I tried removing the RUBYOPT System variable, but I can't load any
scripts.

Ruby was working yesterday. The only thing I can think of that may
have mucked things up would be to run a $:.unshift() call in one of my
scripts yesterday.

Does anybody know what is going on and how I can solve this?

Thank you,
Brian Takita

 
Reply With Quote
 
 
 
 
Mark Hubbart
Guest
Posts: n/a
 
      05-12-2005
On 5/11/05, Brian Takita <(E-Mail Removed)> wrote:
> Hello,
>=20
> I am running the one-click ruby verion 1.8.2-15 on Windows XP.
>=20
> When I try to run a ruby script, I get this error, Ruby: No such file
> to load -- ubygems (LoadError).
>=20
> I tried removing the RUBYOPT System variable, but I can't load any
> scripts.
>=20
> Ruby was working yesterday. The only thing I can think of that may
> have mucked things up would be to run a $:.unshift() call in one of my
> scripts yesterday.
>=20
> Does anybody know what is going on and how I can solve this?=20


install RubyGems http://rubygems.rubforge.org

But seriously, it's probably due to the RUBYOPT environment variable
being set. Since unsetting it broke your scripts, there may be
something else set in it as well. If so, try removing just the
"rubygems" part of the variable's content.

But still, installing RubyGems will solve the problem, and give you
access to some very nifty software and libraries to boot.

cheers,
Mark


 
Reply With Quote
 
 
 
 
Brian Takita
Guest
Posts: n/a
 
      05-12-2005
Mark, thank you for your response.

I apologize for my hasty words. I did have RubyGems installed. When I
removed RUBYOPT, Ruby worked sans any of the Gems (which is to be
expected).

I'll try reinstalling Gems.

It's too bad RubyGems are not a part of the default Ruby installation.

 
Reply With Quote
 
Brian Takita
Guest
Posts: n/a
 
      05-12-2005
I tried performing the command "gem install rubygems"
It was performed successfully, however whenever I tried running a ruby
script, I still get the error "ruby: No such file to load -- ubygems
(LoadError)". I still need to try installing rubygems via the tar.gz
file.

What is interesting is irb, erb, and gem, which all use ruby.exe work
without the error. I can also load gems.

 
Reply With Quote
 
Mark Hubbart
Guest
Posts: n/a
 
      05-12-2005
On 5/12/05, Brian Takita <(E-Mail Removed)> wrote:
> I tried performing the command "gem install rubygems"
> It was performed successfully, however whenever I tried running a ruby
> script, I still get the error "ruby: No such file to load -- ubygems
> (LoadError)". I still need to try installing rubygems via the tar.gz
> file.
>=20
> What is interesting is irb, erb, and gem, which all use ruby.exe work
> without the error. I can also load gems.


Unset RUBYOPT, then go into irb and inspect ruby's load path ($.
Look in those directories for a directory "rubygems" and files
"rubygems.rb" and "ubygems.rb". If you can't find them, your RubyGems
installation is currupt; try downloading it from their website and
installing.

cheers,
Mark


 
Reply With Quote
 
Brian Takita
Guest
Posts: n/a
 
      05-12-2005
I removed the RUBYOPT, but irb was still able to run.

Anything in the
* RubyDir/bin
* RubyDir/lib/ruby/site_ruby/1.8 (ubygems.rb is in this directory)
directories runs ruby finds the ubygems.rb

RubyDir/bin even runs all of the installed gems.

I'd like to install the tgz version of RubyGems but I can't run
setup.rb because of the error.


It seems that RubyDir/bin holds the key somewhere to get ruby working.
I'll do more investigation into this.

 
Reply With Quote
 
Mark Hubbart
Guest
Posts: n/a
 
      05-12-2005
On 5/12/05, Brian Takita <(E-Mail Removed)> wrote:
> I removed the RUBYOPT, but irb was still able to run.
>=20
> Anything in the
> * RubyDir/bin
> * RubyDir/lib/ruby/site_ruby/1.8 (ubygems.rb is in this directory)
> directories runs ruby finds the ubygems.rb
>=20
> RubyDir/bin even runs all of the installed gems.
>=20
> I'd like to install the tgz version of RubyGems but I can't run
> setup.rb because of the error.
>


unset RUBYOPT before you run the setup script. That should allow you
to set this up properly.

> It seems that RubyDir/bin holds the key somewhere to get ruby working.
> I'll do more investigation into this.


Technically, it's RubyGems which isn't working. RubyGems is a separate
project, currently not affiliated with the main Ruby project.

If what I suggested above doesn't work, I'm going to have to defer
this question to someone who knows more about the windows
installation.

HTH,
Mark


 
Reply With Quote
 
Brian Takita
Guest
Posts: n/a
 
      05-24-2005
I tried unsettinh RUBYOPT and it did not work.
I reinstalled Ruby and everything now works.

Thank you,
Brian

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"ubygems" load error Brian Wolf Ruby 4 02-22-2010 10:09 AM
rubygems install problems (the old ubygems (LoadError) problem. Sigh). Paul van Delst Ruby 6 12-29-2006 04:57 AM
ruby: no such file to load -- ubygems (LoadError) coachhilton@gmail.com Ruby 0 03-03-2006 05:37 PM
Putting -r ubygems in the path permanently? David Brady Ruby 5 11-12-2005 02:40 PM



Advertisments