How can I set the ruby loadpath?

How can I set the ruby loadpath outside of the source code? for example,
set up an environment variable or add a command-line parameter.

Zhao Yi wrote:

How can I set the ruby loadpath outside of the source code? for example,
set up an environment variable or add a command-line parameter.

ruby -h says:

-Idirectory specify $LOAD_PATH directory (may be used more than
once)

Zhao Yi wrote:

How can I set the ruby loadpath outside of the source code? for example,
set up an environment variable or add a command-line parameter.

On Windows you can set RUBYLIB env variable.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs