ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: require an entire package?
by David A. Black other posts by this author
Jul 1 2009 4:57PM messages near this date
Re: require an entire package? | windows api using a handle to focus input
Hi --

On Thu, 2 Jul 2009, Gary Chris wrote:

>  Hello,
> 
>  I just replied to you over on ubuntuforums but i'll stick it here also.
> 
>  You could just add the directory containing the files to the load_path
>  array
> 
>  $LOAD_PATH << "#{File.dirname(__FILE__)}/../../dir_containing_files"
> 
>  This will load all files that are located within the directory.

Adding directories to the load path doesn't load any files. The load
path is just where Ruby will search when you try to load something.
You still have to do it explicitly.


David

-- 
David A. Black / Ruby Power and Light, LLC
Ruby/Rails consulting & training: http://www.rubypal.com
Now available: The Well-Grounded Rubyist (http://manning.com/black2)
"Ruby 1.9: What You Need To Know" Envycasts with David A. Black
http://www.envycasts.com
Thread:
Juston
Michael Linfield
Michael Linfield
Juston
Gary Chris
David A. Black

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved