Forum: Ruby RUBYLIB on windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Robert H. (Guest)
on 2009-02-20 20:07
How do i set rubylib on windows?

Specifically I would like to ask a directory like

/Depot/Ruby/Source/

which contains my ruby scripts.

(PS: Windows drives me crazy... things which are easy on Linux seem to
be quite hard on Windows)
Joel VanderWerf (Guest)
on 2009-02-20 21:41
(Received via mailing list)
Marc H. wrote:
> How do i set rubylib on windows?
>
> Specifically I would like to ask a directory like
>
> /Depot/Ruby/Source/
>
> which contains my ruby scripts.
>
> (PS: Windows drives me crazy... things which are easy on Linux seem to
> be quite hard on Windows)

It's not so bad. On windows I have a file /local.rb like this:

# This is intended to be used with the env var
#   RUBYOPT=-r/path/to/this/file
# For example,
#   RUBYOPT=-r/local
# or
#   RUBYOPT=-rubygems -r/local

require 'rubygems'

$LOAD_PATH.concat %w{
   C:/prj/something/lib
   C:/prj/something-else/lib
}
Jeff M. (Guest)
on 2009-02-21 18:51
Marc H. wrote:
> How do i set rubylib on windows?
>
> Specifically I would like to ask a directory like
>
> /Depot/Ruby/Source/
>
> which contains my ruby scripts.
>
> (PS: Windows drives me crazy... things which are easy on Linux seem to
> be quite hard on Windows)

Assuming XP here:

My Computer [Desktop Icon(usually)] <right click> => Properties [Menu
Selection]

System Properties [Window] => Advanced [Tab] => Environment Variables
[Button]

Environment Variables [Window] => System Variables [Panel] => New
[Button]

NT has some similar chain, don't know about Vista, sorry
Phlip (Guest)
on 2009-02-21 19:30
(Received via mailing list)
> (PS: Windows drives me crazy... things which are easy on Linux seem to
> be quite hard on Windows)

Or install CygWin. There are still issues, but in general it will
simulate a
GNU/POSIX environment, all the way down to a mutilatable /etc folder!
This topic is locked and can not be replied to.