Hi,
I am trying to use Ruby on OS X. I installed libnet4r using gem and then
when I try to do *require libnet4r *in a script, I get a LoadError. I
have
added the path to libnet4r to LOAD_PATH. Still it does not work. What
might
be the problem?
Thanks
I used to hit that all the time cuz I’d forget one minor detail… try
adding the following before your require statements:
require ‘rubygems’
require ‘rubygems’ first?
Hi,
I figured it out. Gem was using a different ruby. Once I removed the old
Ruby, it worked perfectly.
Thanks all
Thanks for the replies.
I got the same error for rubygems! The output of gem environment is
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.5
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174)
[universal-darwin10.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /Users/rony/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
I added /Library/Ruby/Gems/1.8 to LOAD_PATH in irb and tried the same,
but
got LoadError.
Thanks