git-up
git-up copied to clipboard
git-up not working on OS X Mavericks
Using the basic instructions, it seems to install OK:
%> sudo gem install git-up Fetching: git-up-0.5.12.gem (100%) Successfully installed git-up-0.5.12 Parsing documentation for git-up-0.5.12 Installing ri documentation for git-up-0.5.12 Done installing documentation for git-up after 0 seconds 1 gem installed
However it is not functional:
%> git up git: 'up' is not a git command. See 'git --help'.
Did you mean one of these? pull push
I'm setup with homebrew git that's found first before os x git: %> for g in $(which -a git) ; $g --version git version 1.9.0 git version 1.8.5.2 (Apple Git-48)
Not sure what to provide, not a ruby guy.
%> gem list
*** LOCAL GEMS ***
bigdecimal (1.2.5, 1.2.4) colored (1.2) diff-lcs (1.2.5) git-up (0.5.12) grit (2.5.0) io-console (0.4.2) json (1.8.1) mime-types (2.2, 1.25.1) minitest (5.3.1, 4.7.5) posix-spawn (0.3.8) psych (2.0.4, 2.0.3) rake (10.1.1, 10.1.0) rdoc (4.1.1, 4.1.0) test-unit (2.5.5, 2.1.1.0)
%> gem --version 2.2.2
I tracked down the actual binary, and that does work when invoked directly:
%> /usr/local/lib/ruby/gems/2.1.0/gems/git-up-0.5.12/bin/git-up Fetching origin ...
So, the issue then is, what maps "git up" to the above binary?
It works for me with the default ruby installation. I think that you are using a custom ruby, because the versions don't match. Mine is ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13] while yours seems to be Version 2.1.
Is it possible that the gem binary path is not in your PATH?
I was able to install git-up on my machine because the dependencies that require building a native extension were already installed.
Check out https://github.com/headius/ruby-atomic/issues/43#issuecomment-38201002 that provides a fix for this issue.
I'm also having issues:
Building native extensions. This could take a while...
ERROR: Error installing git-up:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR="
compiling posix-spawn.c
In file included from posix-spawn.c:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/ruby.h:24:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin13/ruby/config.h:17:9: warning: '_GNU_SOURCE' macro redefined
#define _GNU_SOURCE 1
^
posix-spawn.c:3:9: note: previous definition is here
#define _GNU_SOURCE
^
1 warning generated.
linking shared-object posix_spawn_ext.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [posix_spawn_ext.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/posix-spawn-0.3.8 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/posix-spawn-0.3.8/ext/gem_make.out
FAIL: 1
I'm having the same issue as @marcoscaceres
@sjmarshy, this worked for me:
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install git-up
@marcoscaceres' solution worked for me, also.
I was having the same issue as @bedge. Solved it using rvm to install ruby on my Mac and switch to the global gemset:
curl -sSL https://get.rvm.io | bash -s stable --ruby
rvm --default use ruby-2.1.2
gem update --system
gem update
rvm gemset use global
Then added the ruby gems path to the shell PATH:
PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH"
And finally installed with gem install git-up (no admin privileges needed).
Thank you @asmod3us! Worked for me on OSX Yosemite Beta...
I just used rvm --default use ruby-2.1.3 instead since that was the most current version as of this post
:heart:
If you are running rbenv, you'll need to run rbenv rehash after installing executable gems, so it can symlink its shims.
@nemoDreamer thank you. That did it for me.
@asmod3us That worked for me! It was a headache before I found this post. Thanks!
@asmod3us nice trick. Used rvm info to figure out which ruby version to use with the rvm --default use command.