Hello folks, i found a strange behaviour that i really can’t explain.
I have a ruby project structured in this way
-lib -testruby scripts in ‘test’ have require directives like
require ‘…/lib/TSWatirIE.rb’
or
logfile =
‘…/logs/Odf_potenziale_accede_compila_anagrafica__e_diventa_odfIE.log’
Now, i’ve got my ruby scripts on ‘test’ (they are watir scripts). When i
run
them from a dos shell, or from scite, they work fine. When i try to run
them
from an ide, like RDT or netBeans ruby ide, i always come to the
following
error
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require’: no such file to load – …/lib/TSWatirIE.rb
(LoadError)
or
No such file or directory -
…/logs/Odf_potenziale_accede_compila_anagrafica__e_diventa_odfIE.log
(Errno::ENOENT)
The weird thing is that all paths work thiw way:
require ‘lib/TSWatirIE.rb’
or
logfile =
‘logs/Odf_potenziale_accede_compila_anagrafica__e_diventa_odfIE.log’
But, obviously, they don’t work in the shell environment.
Have you got any idea for this behaviour?
Thanks
–
Andrea M.
A clever person solves a problem.
A wise person avoids it.
Einstein