bundle install
, then:
$ ruby the_problem.rb
the_problem.rb:4:in `exec': No such file or directory - -al (Errno::ENOENT)
from the_problem.rb:4:in `<main>'
Without dropbox:
$ ruby -e "Kernel.exec ['/bin/ls', '/bin/ls'], '-al'"
total 112
drwxr-xr-x 9 rsutphin CB\Domain Users 306 Jul 17 14:57 .
drwxr-xr-x 5 rsutphin CB\Domain Users 170 Jul 17 14:42 ..
-rw-r--r-- 1 rsutphin CB\Domain Users 45 Jul 17 15:09 Gemfile
-rw-r--r-- 1 rsutphin CB\Domain Users 246 Jul 17 14:58 Gemfile.lock
-rw-r--r-- 1 rsutphin CB\Domain Users 92 Jul 17 15:11 the_problem.rb
(i.e., the output from ls -al
.)
The ultimate culprit is this code in dropbox/extensions/array.rb
:
class Array # :nodoc:
# [...]
def to_hash # :nodoc:
inject({}) { |hsh, (k,v)| hsh[k] = v ; hsh }
end unless method_defined?(:to_hash)
end
This is a practical problem because
childprocess
uses this form ofexec
call.childprocess
is used byselenium-webdriver
. So Selenium doesn't work to test a project that also includes this dropbox gem. You get errors like:(with chromedriver), or
(with firefox).