ruby - 'Require' works on one computer but not on another -


i error on server i'm trying run ruby script.

require: no such file load -- ssch_mail_lib (loaderror)

however, on workstation computer 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 names , directories. match.

any ideas i'm missing? or why work fine on 1 machine not on another? thanks!

edit: both using ruby 1.8.7.

edit2: script works when run via textmate. not work, (loaderror), when using terminal.

there 1 fundamental difference between 1.8 , 1.9: require semantics. in 1.8, require handles relative , absolute paths. in 1.9, require can used standard library, not user defined files in relative paths or locations. that, have use ruby 1.9 method require_relative. i'm guessing 1 of computers has 1.8, , other 1.9. can use clause ruby_version make version specific code.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -