Lesson learned: script/runner does not abort on failed requi

After a fresh installation of an application, some utility scripts
run with script/runner quietly aborted right after their start. No
error message whatsoever, just a new shell prompt. The reason was an
uninstalled dependecy, but that was difficult to determine because
the load failure was not reported:

% ruby script/runner ‘require “foobarbaz”’
%

Why that does not raise an excepcion? command/runner.rb evals
ARGV.first and eval does raise LoadError:

irb(main):002:0> eval(‘require “foobarbaz”’)
LoadError: (eval):1:in `require’: no such file to load – foobarbaz

Is there any magic in Rails that has that side effect?

– fxn

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs