我在我的 Linux 系统中安装了一个旧的 ruby:
% ruby -v
ruby 1.9.2p188 (2011-03-28) [x86_64-linux-gnu]
我的主目录中安装了一个较新的 ruby:
% ~/ruby/bin/ruby -v
ruby 1.9.3p448 (2013-06-27) [x86_64-linux]
但不知何故,捆绑器(或 rake 或 rails)在某个步骤上运行旧的 ruby 并得到:
% ~/ruby/bin/bundle exec rake
Rails 4 prefers to run on Ruby 2.0.
You're running
ruby 1.9.2p188 (2011-03-28) [x86_64-linux-gnu]
Please upgrade to Ruby 1.9.3 or newer to continue.
为什么?我该怎么办?
这是它在引擎盖下的作用:
% strace -f -e trace=process ~/ruby/bin/bundle exec rake
execve("/home/ilyak/ruby/bin/bundle", ["/home/ilyak/ruby/bin/bundle", "exec", "rake"], [/* 32 vars */]) = 0
clone(Process 6460 attached
child_stack=0x7ffeb759cff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ffeb759d9d0, tls=0x7ffeb759d700, child_tidptr=0x7ffeb759d9d0) = 6460
[pid 6460] _exit(0) = ?
[pid 6460] +++ exited with 0 +++
execve("/usr/bin/rake", ["rake"], [/* 37 vars */]) = 0
为什么?他们在想什么?