Ruby Path

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!

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.

On 3/1/06, [email protected] [email protected] 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.

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

On 3/1/06, Mark V. [email protected] 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