Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git up not working in Ubuntu #78

Open
jamespsterling opened this issue Oct 20, 2014 · 7 comments
Open

git up not working in Ubuntu #78

jamespsterling opened this issue Oct 20, 2014 · 7 comments

Comments

@jamespsterling
Copy link

Ran the gem install and when I run the git up command I get:

/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:inrequire'
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:inrequire'
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:inrequire'
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:inrequire'
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:inrequire'
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

@RichDickClark
Copy link

Me too!
Ubuntu 12.04
git version 1.7.9.5

@unoexperto
Copy link

It didn't even get installed in my case.

[zzzz@q2s3 tt_dev]$ gem install git-up

fWARNING:  Installing to ~/.gem since /usr/lib64/ruby/gems/1.8 and
          /usr/bin aren't both writable.
WARNING:  You don't have /home/zzzz/.gem/ruby/1.8/bin in your PATH,
          gem executables will not run.
Building native extensions.  This could take a while...
Successfully installed colored-1.2
Successfully installed posix-spawn-0.3.9
Successfully installed mime-types-1.25.1
Successfully installed diff-lcs-1.2.5
Successfully installed grit-2.5.0
Successfully installed git-up-0.5.12
6 gems installed
Installing ri documentation for colored-1.2...
Installing ri documentation for posix-spawn-0.3.9...
Installing ri documentation for mime-types-1.25.1...
Installing ri documentation for diff-lcs-1.2.5...
Installing ri documentation for grit-2.5.0...
Installing ri documentation for git-up-0.5.12...
Installing RDoc documentation for colored-1.2...
Installing RDoc documentation for posix-spawn-0.3.9...
Installing RDoc documentation for mime-types-1.25.1...
Installing RDoc documentation for diff-lcs-1.2.5...
Installing RDoc documentation for grit-2.5.0...
Installing RDoc documentation for git-up-0.5.12...
[zzzz@q2s3 tt_dev]$
[zzzz@q2s3 tt_dev]$ git up
git: 'up' is not a git command. See 'git --help'.

Did you mean one of these?
        pull
        push

@gepoch
Copy link

gepoch commented Feb 2, 2015

@CPPExpert I think you need to add your ruby gems bin directory to your PATH.

$ export PATH="$PATH:~/.gem/ruby/1.8/bin"

Put that in your ~/.bashrc file if you don't want to run it on start.

@gepoch
Copy link

gepoch commented Feb 2, 2015

Forgot to mention: I'm also seeing this issue with @jamespsterling's traceback 😃

Reproduced with formatting here:

/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:23:in `load'
    from /usr/local/bin/git-up:23

@amedee
Copy link

amedee commented May 21, 2015

@gepoch I added to my path just like you wrote, but my ruby gems directory does not have a bin directory.

$ echo $PATH
/home/amedee/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/amedee/.rvm/bin:/home/amedee/cov-analysis/bin:/home/amedee/.rvm/bin:~/.gem/ruby/1.8/bin

$ ls ~/.gem/ruby/1.8/
cache

@gepoch
Copy link

gepoch commented May 21, 2015

@amedee yeah.. I'm not much of a ruby person, actually..

I eventually ended up switching to the python port, which works perfectly for me.

@amedee
Copy link

amedee commented May 21, 2015

@gepoch I uninstalled ruby and I am currently installing it as described on https://coolaj86.com/articles/installing-ruby-on-ubuntu-12-04.html
With one change:

curl -L https://get.rvm.io | bash -s stable

should be

curl -L https://get.rvm.io | bash -s stable --ruby --auto-dotfiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants