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.

···

--
Posted via http://www.ruby-forum.com/.

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)

···

--
Posted via http://www.ruby-forum.com/\.

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.

···

--
Posted via http://www.ruby-forum.com/\.