# Ruby Path

**URL:** <https://www.ruby-forum.com/t/ruby-path/75347>\
**Category:** Ruby\
**Created:** [March 1, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/ruby-path/75347 "2006-03-01T18:58:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 1, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/ruby-path/75347/1 "2006-03-01T18:58:50Z")

</div>

My ruby applications have suddenly stopped running on my PC. It looks  
like the gem libraries are no longer in the path. My gems are  
installed to this directory C:\ruby\lib\ruby\gems\1.8\gems\

I never had to setup a manual path for this, it was “auto-magically”  
handled by Ruby. Any ideas what would cause this to just quit working  
like this and how to fix it? Is there some Ruby config file that loads  
the paths etc…

Thanks!

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 1, 2006, 7:57pm UTC](https://www.ruby-forum.com/t/ruby-path/75347/2 "2006-03-01T19:57:26Z")

</div>

unknown wrote:

> My ruby applications have suddenly stopped running on my PC. It looks  
> like the gem libraries are no longer in the path. My gems are  
> installed to this directory C:\ruby\lib\ruby\gems\1.8\gems\
> 
> I never had to setup a manual path for this, it was “auto-magically”  
> handled by Ruby. Any ideas what would cause this to just quit working  
> like this and how to fix it? Is there some Ruby config file that loads  
> the paths etc…

Libraries in the gem directories need to use the RubyGems runtime to  
find them. The one click installer implicitly loads RubyGems by setting  
the RUBYOPT environment variable to ‘rubygems’. Is is possible this  
environment variable is no longer set?

* * *

– Jim W.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 2, 2006, 1:44am UTC](https://www.ruby-forum.com/t/ruby-path/75347/3 "2006-03-02T01:44:55Z")

</div>

On 3/1/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Jim,
> 
> Thanks for the help! The RUBYOPT environment variable must be set  
> behind the scenes somewhere. I did not have it set in my Windows  
> environment variables previously, but had just recently added it and  
> set it to “w” to get more detailed warning messages. After changing  
> this to “rubygems” everything worked great again.

How do you put two options in RUBTOPT? What’s the delimiter?  
For example, what if I wanted both “rubygems” and “w”?  
“rubygems w” and “rubygems, w” don’t work under Windows in Ruby 1.8.4.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 1, 2006, 10:18pm UTC](https://www.ruby-forum.com/t/ruby-path/75347/4 "2006-03-01T22:18:45Z")

</div>

Jim,

Thanks for the help! The RUBYOPT environment variable must be set  
behind the scenes somewhere. I did not have it set in my Windows  
environment variables previously, but had just recently added it and  
set it to “w” to get more detailed warning messages. After changing  
this to “rubygems” everything worked great again.

Joe

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 2, 2006, 5:05am UTC](https://www.ruby-forum.com/t/ruby-path/75347/5 "2006-03-02T05:05:31Z")

</div>

On 3/1/06, Mark V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> For example, what if I wanted both “rubygems” and “w”?  
> “rubygems w” and “rubygems, w” don’t work under Windows in Ruby 1.8.4.

If you want to put multiple options in RUBYOPT then you must use the  
“-” character on the options. So, in this case you’d have to set it to  
“-rubygems -w”.

Curt
