gem version incompatibility: posix-spawn-0.3.9 breaks git-up-0.5.12
posix-spawn-0.3.9 breaks git-up-0.5.12 (on Ubuntu 12.04, 32bit, with ruby 1.8.7, gem 1.8.15). Manually reverting to posix-spawn-0.3.8 solves the problem.
Here's the output under posix-spawn-0.3.9:
$ git up
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': /var/lib/gems/1.8/gems/posix-spawn-0.3.9/lib/posix/spawn.rb:243: syntax error, unexpected tSYMBEG, expecting tAMPER (SyntaxError)
::Kernel::exec(*argv, :close_others=>false)
^
/var/lib/gems/1.8/gems/posix-spawn-0.3.9/lib/posix/spawn.rb:274: syntax error, unexpected tIDENTIFIER, expecting tAMPER
...(*system_command_prefixes, cmd, :out => w, r => :close)
^
/var/lib/gems/1.8/gems/posix-spawn-0.3.9/lib/posix/spawn.rb:274: syntax error, unexpected tASSOC, expecting tCOLON2 or '[' or '.'
...command_prefixes, cmd, :out => w, r => :close)
^
/var/lib/gems/1.8/gems/posix-spawn-0.3.9/lib/posix/spawn.rb:274: syntax error, unexpected tASSOC, expecting '='
...prefixes, cmd, :out => w, r => :close)
^
/var/lib/gems/1.8/gems/posix-spawn-0.3.9/lib/posix/spawn.rb:526: syntax error, unexpected ',', expecting ']'
[*system_command_prefixes, args[0]]
^
/var/lib/gems/1.8/gems/posix-spawn-0.3.9/lib/posix/spawn.rb:526: syntax error, unexpected ']', expecting kEND
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/posix-spawn-0.3.9/lib/posix-spawn.rb:1
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/grit-2.5.0/lib/grit/git.rb:2
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/grit-2.5.0/lib/grit.rb:34
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/git-up-0.5.12/lib/git-up.rb:2
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/git-up-0.5.12/bin/git-up:3
from /usr/local/bin/git-up:19:in `load'
from /usr/local/bin/git-up:19
I've had the same problem. Checkout out posix-spawn and running it's tests with rake also generates the same errors. It looks like Posix-spawn as of 0.3.9 isn't compatible with ruby1.8. I tested on a box running ruby 1.9.3 and had no problems.
Update: raised an issue in posix-spawn at https://github.com/rtomayko/posix-spawn/issues/62
This is weird because I'm running ruby 2.1.2p95 and I'm getting this error.
Get the same error with ruby 1.8.7. For now rolling back to posix-spawn-0.3.8 works for me.
I am not a Ruby developer, I am just a git user. What do I do to make this work?
Posix-spawn 0.3.10 release resolves the issue for me at least. A fresh gem install of git-up should be fine now