From: Timothy Hunter Date: 2006-06-02T10:35:20+09:00 Subject: Re: Requiring libraries in command line scripts? Joe wrote: > I have a simple script: > > #!/usr/bin/ruby > > require 'rubilicious' > #require '/usr/lib/ruby/gems/1.8/gems/Rubilicious-0.1.5/rubilicious.rb' > > r = Rubilicious.new('joe', '12345') > > r.add('http://yahoo.com', 'yahoo') > > When run, I get: > `require': no such file to load -- rubilicious (LoadError) > > But if I comment out the first require, and uncomment the second, it > works. Is there something I can do so that command line scripts don't > have to specify the full path when including library files? > > Thanks, > Joe > > Don't you need to require 'rubygems' before requiring a gem?