$LOAD_PATH << "./lib"<div>will add lib to the end of the list giving other libraries precedence</div><div><br></div><div>$LOAD_PATH.unshift("./lib")</div><div>will add the lib folder at the start of the list making it take precedence over other libraries</div>
<div><br></div><div>a shortcut for $LOAD_PATH is $: </div><div>$: << "./lib"</div><div>$:.unshift("./lib")</div><div><br clear="all">---<br>Met vriendelijke groeten - Best regards - Salutations<br>
Ivan Porto Carrero<br>Blog: <a href="http://flanders.co.nz">http://flanders.co.nz</a><br>Twitter: <a href="http://twitter.com/casualjim">http://twitter.com/casualjim</a><br>Author of IronRuby in Action (<a href="http://manning.com/carrero">http://manning.com/carrero</a>)<br>
<br>
<br><br><div class="gmail_quote">On Thu, Jul 30, 2009 at 4:12 PM, Michael Delaney <span dir="ltr"><<a href="mailto:lists@ruby-forum.com">lists@ruby-forum.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
hi,<br>
<br>
i've been including my libs using the RUBYLIB env variable, doing<br>
SET RUBYLIB='some path'<br>
<br>
then running ir program.rb and it now has access to the files in 'some<br>
path'<br>
<br>
i also tried to do this dynamically in the ruby script using 'system'.<br>
<br>
i.e.<br>
<br>
system 'SET RUBYLIB='some path''<br>
require 'some.dll' (where that file is in the path above'.<br>
<br>
but it doesnt find the file. i assume ir is setting up the search paths<br>
when it starts up, is there anyway to achieve?<br>
<br>
<br>
what i want is to be able to include a ruby file in my C# project, which<br>
can include all the dll's in the projects bin easily. i guess i could<br>
just traverse the directory and do a require 'file' but the RUBYLIB path<br>
seems more flexible.<br>
<font color="#888888">--<br>
Posted via <a href="http://www.ruby-forum.com/" target="_blank">http://www.ruby-forum.com/</a>.<br>
_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
</font></blockquote></div><br></div>