Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #2644

Re: Beginner's Beginner

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail
From 7stud -- <bbxx789_05ss@yahoo.com>
Newsgroups comp.lang.ruby
Subject Re: Beginner's Beginner
Date Mon, 11 Apr 2011 18:23:53 -0500
Organization Service de news de lacave.net
Lines 33
Message-ID <4a277f7435d09ffe2508e24ebe321c96@ruby-forum.com> (permalink)
References <5eb7523dd74392a56e954a3486b4830f@ruby-forum.com> <ab0373fb31c334955b289bb9cc4f9095@ruby-forum.com>
NNTP-Posting-Host bristol.highgroove.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace talisker.lacave.net 1302564243 27656 65.111.164.187 (11 Apr 2011 23:24:03 GMT)
X-Complaints-To abuse@lacave.net
NNTP-Posting-Date Mon, 11 Apr 2011 23:24:03 +0000 (UTC)
In-Reply-To <ab0373fb31c334955b289bb9cc4f9095@ruby-forum.com>
X-Received-From This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway
X-Mail-Count 381309
X-Ml-Name ruby-talk
X-Rubymirror Yes
X-Ruby-Talk <4a277f7435d09ffe2508e24ebe321c96@ruby-forum.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.ruby:2644

Show key headers only | View raw


7stud -- wrote in post #992150:
> 1) Add the directory containing the file you want to require() to the
> directories that are searched by default:
>
> $LOAD_PATH << "/some_dir/sub_dir/my_ruby_programs/"
>

$LOAD_PATH is an array, and the << is like calling push() on an 
array--for instance:

arr.push(additional_element)

The result is that the $LOAD_PATH array will contain an additional 
string, which is the name of the directory you want to add.  However, 
the $LOAD_PATH array will be changed only for the duration of your 
program; when you run another program, the $LOAD_PATH array will be 
reconstructed with the default directories plus whatever directory is 
the current directory.

> For a more permanent solution, you can also:
>
> 2) Add the directory containing the file you want to require, to your
> system's PATH environment variable.
>

> 3) Create a new environment variable called RUBYPATH, which specifies
> additional directories that you want ruby to search.
>
>

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

Back to comp.lang.ruby | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Beginner's Beginner william nelson <wanelson23@gmail.com> - 2011-04-11 04:26 -0500
  Re: Beginner's Beginner 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-11 15:04 -0500
    Re: Beginner's Beginner 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-11 18:23 -0500

csiph-web