# Ruby must run in c:\\ruby in order to find libraries (xp sp2)

**URL:** <https://www.ruby-forum.com/t/ruby-must-run-in-c-ruby-in-order-to-find-libraries-xp-sp2/93172>\
**Category:** Ruby\
**Created:** [April 28, 2007, 5:55pm UTC](https://www.ruby-forum.com/t/ruby-must-run-in-c-ruby-in-order-to-find-libraries-xp-sp2/93172 "2007-04-28T17:55:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/9dc877/32.png) [@zenix](https://www.ruby-forum.com/u/zenix)\
**Post date:** [April 28, 2007, 5:55pm UTC](https://www.ruby-forum.com/t/ruby-must-run-in-c-ruby-in-order-to-find-libraries-xp-sp2/93172/1 "2007-04-28T17:55:12Z")

</div>

Microsoft Windows© XP SP2 with the latest patches, bugfixes, etc.  
Ruby 1.8.5 and .6, both did not work  
Rubygems 0.9.2  
RUBYOPT = -rubygems  
PATH = c:\ruby\bin;c:\perl…  
Installed via One-Click-Installer (both .5 and .6)

Whenever I try to run a Ruby script, the parser pauses for about 10 secs  
then returns with an error trying to locate Mongrel. I’ve installed it  
via rubygems which did work outside of C:\Ruby. When I went to C:\Ruby  
and typed the full path to execute it (ruby “C:\Document and  
Settings…\Ruby\mongrel.rb”) it runs ok, everything is happy. I think  
it may have to do with a missing enviorment variable. I did download and  
manually install Ruby 1.8.6 (by downloading the binaries) but Rubygems  
wouldn’t install (missing libraries…zlib, etc) but I haven’t taken  
that course of action yet as the One-Click is much easier 😉

Anyone can help me please? I don’t really use newsgroups much so a  
direct email would be better 🙂 Thanks!

---

<div class="post-metadata">

**Author:** ![zenix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/9dc877/32.png) [@zenix](https://www.ruby-forum.com/u/zenix)\
**Post date:** [April 29, 2007, 7:37pm UTC](https://www.ruby-forum.com/t/ruby-must-run-in-c-ruby-in-order-to-find-libraries-xp-sp2/93172/2 "2007-04-29T19:37:19Z")

</div>

On Apr 28, 11:55 am, zenix [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> and typed the full path to execute it (ruby "C:\Document and  
> Posted viahttp://www.ruby-forum.com/.  
> Ok, I’ve gone about installing Ruby from the download binaries. Same  
> enviorment, using Ruby 1.8.6. I am able to run scripts that only use  
> the standard library (eg only File, Dir, Base64, Set, etc) but  
> whenever I try to run a script that uses a RubyGem, it failes giving  
> this error:

./mongrel.rb:44: uninitialized constant Mongrel (NameError)  
from C:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:  
27:in `gem_original_require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in `require’  
from mongrel.rb:2

I don’t know why it’s happening, I have an installation on Ubuntu that  
works completely fine. Line 2 is “require ‘mongrel’” and line 44 is a  
quick test after I commented out the other code - “puts  
Mongrel::HttpServer.new.inspect”

Again, will anyone help me? I’ve warmed up to newsgroups a bit more so  
you don’t have to email me directly 😉
