I'm trying to use a gem i just installed (via sudo gem install excelsior
) like so
require 'rubygems'
require 'excelsior'
...
This works fine in irb, but when I stick exactly the same code into an .rb file and try run it with ruby I get <internal:lib/rubygems/custom_require>:29:in require': no such file to load -- excelsior (LoadError)
I guess it has something to do with the load paths apparently being completely different in irb from ruby (I'm on a mac and don't remember exactly how I installed the version of ruby I'm using).
So how do I configure ruby to have the same loadpath as irb?
One extra piece of info: some gems work, but not all :S