I'm not sure if this belongs here or anywhere else (SuperUser?), But anyway:
I have two Ruby scripts that require Ruby 2.0 (A) and the other 1.8 (B). A needs to call B with forked processes. And something like this:
require "fileutils"
require "json"
...
`name_of_B`
B is an executable script using shebang, starting as follows:
require 'rubygems'
require 'json'
...
I use RVMto control my versions of Ruby:
> rvm list
rvm rubies
ruby-1.8.7-p374 [ i686 ]
ruby-1.9.3-p448 [ x86_64 ]
=* ruby-2.0.0-p247 [ x86_64 ]
I run A with:
> ruby name_of_A
but in the end:
/Users/jacobevelyn/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext/parser.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2013-06-27 patchlevel 374) [i686-darwin12.5.0]
, ? , , B , Ruby 2.0, 1.8. (, gem install json 1.8.) , , , ( , , , " t ), .