Forum: Ruby how to set RUBYLIB path?

B736ee289a70ae21e323ed2f808dd0ce?d=identicon&s=25 dare ruby (martin_mercy2001)
on 2008-04-18 07:38
Dear all,

I was struggling with a problem. I have a product class and a test file
under Merchant folder. when i run my product class it shows following

`gem_original_require': no such file to load -- builder (LoadError)
  from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
  from product.rb:2

I need to set path like set RUBYLIB = ""

i didnt got how to set the path and in which file i have to set or in
shell prompt? how to set path?

Could any one help me to solve this problem of setting path.

Thanks in advance

Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2008-04-18 16:57
(Received via mailing list)
maybe gem install builder?
if not maybe google for 'rubygems path' and 'RUBYLIB environment
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2008-04-18 18:40
(Received via mailing list)
On Fri, Apr 18, 2008 at 7:38 AM, dare ruby <>
>   from product.rb:2
>  Regards,
>  Martin
>  --
>  Posted via

There are basically three possibilities let us say your library is here:
setting the variable
export RUBYLIB="/lib/mylibs/${RUBYLIB:-""}"
using a command line option
ruby -I/lib/mylib myprog.rb
adjust your $: inside your ruby program
$:.unshift File.join( %w{ /lib mylib } )



Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.