how to set RUBYLIB path?

D

dare ruby

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
error.

c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`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
`require'
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

Regards,
Martin
 
R

Roger Pack

maybe gem install builder?
if not maybe google for 'rubygems path' and 'RUBYLIB environment variable'
 
R

Robert Dober

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
error.

c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`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
`require'
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

Regards,
Martin

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

HTH
Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top