I get this error on the server that I'm trying to run a ruby script.
require: no such file to load -- ssch_mail_lib (LoadError)
However, on my workstation computer the script runs fine.
Here's relevant code.
#!/usr/bin/ruby
$: << './lib'
require 'ssch_mail_lib'
Output of $LOAD_PATH
/Library/Ruby/Site/1.8
/Library/Ruby/Site/1.8/powerpc-darwin11.0
/Library/Ruby/Site/1.8/universal-darwin11.0
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8/universal-darwin11.0
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin11.0
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0
.
./lib
I've tripled checked the names and directories. They match.
Any ideas what I'm missing? Or why it would work fine on one machine but not on another? Thanks!
EDIT: They are both using Ruby 1.8.7.
EDIT2: The script only works when run via TextMate. It does not work, (LoadError)
, when using terminal.