# Ruby Path

**URL:** <https://rubytalk.org/t/ruby-path/25332>\
**Category:** ruby-talk\
**Created:** [1 March 2006 17:58 UTC](https://rubytalk.org/t/ruby-path/25332 "2006-03-01T17:58:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Seeley](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@Joe\_Seeley](https://rubytalk.org/u/Joe_Seeley)\
**Post date:** [1 March 2006 17:58 UTC](https://rubytalk.org/t/ruby-path/25332/1 "2006-03-01T17:58:37Z")

</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:** ![Jim\_Weirich1](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Jim\_Weirich1](https://rubytalk.org/u/Jim_Weirich1)\
**Post date:** [1 March 2006 18:57 UTC](https://rubytalk.org/t/ruby-path/25332/2 "2006-03-01T18:57:45Z")

</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 Weirich
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Joe\_Seeley](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@Joe\_Seeley](https://rubytalk.org/u/Joe_Seeley)\
**Post date:** [1 March 2006 21:18 UTC](https://rubytalk.org/t/ruby-path/25332/3 "2006-03-01T21:18:37Z")

</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:** ![Mark\_Volkmann1](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@Mark\_Volkmann1](https://rubytalk.org/u/Mark_Volkmann1)\
**Post date:** [2 March 2006 00:44 UTC](https://rubytalk.org/t/ruby-path/25332/4 "2006-03-02T00:44:42Z")

</div>

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.

> **···**
>
> On 3/1/06, Joiey.Seeley@gmail.com \<Joiey.Seeley@gmail.com\> 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.
> 
> --  
> R. Mark Volkmann  
> Partner, Object Computing, Inc.

---

<div class="post-metadata">

**Author:** ![Curt\_Work\_Hibbs1](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@Curt\_Work\_Hibbs1](https://rubytalk.org/u/Curt_Work_Hibbs1)\
**Post date:** [2 March 2006 04:05 UTC](https://rubytalk.org/t/ruby-path/25332/5 "2006-03-02T04:05:18Z")

</div>

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

> **···**
>
> On 3/1/06, Mark Volkmann \<r.mark.volkmann@gmail.com\> wrote:
> 
> > On 3/1/06, Joiey.Seeley@gmail.com \<Joiey.Seeley@gmail.com\> 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.
