0x26res
0x26res

Reputation: 13902

How to Set RUBYOPT on windows to use additional includes

I am trying to change my RUBYOPT environment variable.

My aim is to use my own library, which is in C:\ruby_lib, so I do:

echo set RUBYOPT="-I C:\ruby_lib\

If I try to run my program, which contains only require "dummy.rb" all I get is no such file to load, which should not happen has long as dummy.rb can be found in C:\ruby_lib

I am wondering if there is something I am doing wrong when I set the RUBYOPT environment variable.

Upvotes: 1

Views: 3914

Answers (1)

Jörg W Mittag
Jörg W Mittag

Reputation: 369458

You are not setting the RUBYOPT environment variable. You are just echoing the string set RUBYOPT="-I C:\ruby_lib\ to the console.

Just remove the echo:

set RUBYOPT=-I C:\ruby_lib

Upvotes: 3

Related Questions