Ruby - Running rb files from script (2) -
i'd write ruby script calls ruby script. example, i'd run "test1.rb" script. test1.rb has been simplified this:
print "1"
then result (-> 1).
i ask others fix problem, , suggested popen3 command:
require 'open3' cmd = 'ruby "test1.rb"' puts dir.pwd open3.popen3(cmd) |stdin, stdout| var = stdout.read puts var end
however, script send error message:
x:/ruby22-x64/lib/ruby/2.2.0/open3.rb:193:in `spawn': no such file or directory - ruby "test1.rb" (errno::enoent)
please me.
Comments
Post a Comment