Problems with brew install hub #205

Closed
chrisnicola opened this Issue Jun 29, 2012 · 15 comments

Comments

Projects
None yet
3 participants

This isn't automatically installing required gem, it's failing on each and every dependency and I'm having to install them manually one at a time.

Member

mislav commented Jun 29, 2012

OK. So what are those dependencies that it's failing on?

Because hub doesn't have any dependencies apart from Ruby's stdlib.

Yeah they were pretty strange, things like, ronn, webmock, sinatra, thin, aruba

Member

mislav commented Jun 30, 2012

These are all development dependencies for the "hub" gem.

You said you were installing via brew install hub. This is completely different from installing the gem. If you are installing the "hub" gem via gem install, you shouldn't have troubles either. Try upgrading your RubyGems version.

Member

mislav commented Jul 1, 2012

I'm gonna close this because it seems you did something wrong in the installation step, and that hub isn't broken in it of itself.

If you're installing via brew install, it might help you to uninstall the ruby gem first: gem uninstall hub -a -x

mislav closed this Jul 1, 2012

This was a new machine with RVM just freshly installed, so I can't imagine it was a ruby gems version issue, I didn't have the gem installed, the only thing I ran was brew.

Member

mislav commented Jul 1, 2012

You ran brew install hub. Then presumably you ran hub: hub version, hub help hub or similar.

Then what happened? You're not describing me very well what was the issue exactly. You said:

it's failing on each and every dependency

But hub doesn't have any dependencies (other than the development ones, but I don't know how you can be aware of those if you installed via brew).

So, I need you to tell me:

  1. Exactly what you ran and what happened as a result

  2. The outputs of:

    $ which -a hub
    $ head -1 `which hub`
    

mislav reopened this Jul 1, 2012

Sorry my bad, what I mean is the during brew install hub it faulted over not finding the dependencies, not afterwards. After installing those gems it installed fine.

Member

mislav commented Jul 2, 2012

Those gems aren't necessary in the brew install phase. This is why I'm totally not getting why you had issues. It would really help me if you simply pasted the errors that you got. Simply uninstall some of the gems which you had to install, and brew uninstall hub; brew install hub again.

Member

mislav commented Jul 2, 2012

Oh and tell me what your rake is. It's possible that you have some harmful rake-Bundler integration going on

$ which -a rake

Here is which -a rake

/Users/chris/.rvm/gems/ruby-1.9.3-p194@global/bin/rake
/Users/chris/.rvm/rubies/ruby-1.9.3-p194/bin/rake
/Users/chris/.rvm/bin/rake
/usr/bin/rake

And the install after just removing sinatra

➜  brew install hub
==> Downloading https://github.com/defunkt/hub/tarball/v1.10.1
Already downloaded: /Library/Caches/Homebrew/hub-1.10.1.tgz
==> rake install prefix=/usr/local/Cellar/hub/1.10.1
/Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.0.pre.1/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'sinatra (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.0.pre.1/lib/bundler/resolver.rb:161:in `start'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.0.pre.1/lib/bundler/resolver.rb:128:in `block in resolve'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.0.pre.1/lib/bundler/resolver.rb:127:in `catch'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.0.pre.1/lib/bundler/resolver.rb:127:in `resolve'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.0.pre.1/lib/bundler/definition.rb:178:in `resolve'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.0.pre.1/lib/bundler/definition.rb:113:in `specs'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.0.pre.1/lib/bundler/environment.rb:27:in `specs'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:60:in `setup'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
        from /Users/chris/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
        from /Users/chris/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
        from /Users/chris/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from /Users/chris/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'
==> Build Environment
CPU: quad-core 64-bit dunno
OS X: 10.7.4-x86_64
Xcode: 4.3.3
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7
CPPFLAGS: -isystem /usr/local/include
LDFLAGS: -L/usr/local/lib
MACOSX_DEPLOYMENT_TARGET: 10.7
MAKEFLAGS: -j4
Error: Failed executing: rake install prefix=/usr/local/Cellar/hub/1.10.1 (hub.rb:10)
If `brew doctor` does not, this may help you fix or report the issue:
    https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist

elskwid commented Jul 6, 2012

I had a similar issue installing hub today. This was my first attempt to install it so there weren't any other items laying around.

Note: I was using rvm with ruby-1.9.3-p194@global when this was run.

≻ brew install hub 
==> Downloading https://github.com/defunkt/hub/tarball/v1.10.1
######################################################################## 100.0%
==> rake install prefix=/usr/local/Cellar/hub/1.10.1
/Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'ronn (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:161:in `start'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:128:in `block in resolve'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `catch'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `resolve'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/definition.rb:192:in `resolve'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/environment.rb:27:in `specs'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:60:in `setup'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
    from /Users/elskwid/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /Users/elskwid/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /Users/elskwid/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /Users/elskwid/.rvm/gems/ruby-1.9.3-p194@global/bin/ruby_noexec_wrapper:9:in `<main>'
==> Build Environment
CPU: quad-core 64-bit sandybridge
OS X: 10.7.3-x86_64
Xcode: 4.3.3 => /Developer
X11: 2.6.3 @ /usr/X11
CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -Os -w -pipe -march=core2 -msse4 -mmacosx-version-min=10.7
CXXFLAGS: -Os -w -pipe -march=core2 -msse4 -mmacosx-version-min=10.7
CPPFLAGS: -isystem /usr/local/include
LDFLAGS: -L/usr/local/lib
MACOSX_DEPLOYMENT_TARGET: 10.7
MAKEFLAGS: -j4
Error: Failed executing: rake install prefix=/usr/local/Cellar/hub/1.10.1 (hub.rb:10)
If `brew doctor` does not, this may help you fix or report the issue:
    https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist

On a hunch I switched to the system ruby (ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]) and tried again:

≻ rvm use system
≻ brew install hub
==> Downloading https://github.com/defunkt/hub/tarball/v1.10.1
Already downloaded: /Users/elskwid/Library/Caches/Homebrew/hub-1.10.1.tgz
==> rake install prefix=/usr/local/Cellar/hub/1.10.1
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
/usr/local/Cellar/hub/1.10.1: 7 files, 112K, built in 2 seconds

Something happening with rvm and/or bundler here?

Member

mislav commented Jul 6, 2012

Yep, RVM does some dumb Bundler integration and forces you to install more stuff than you need.

I might fix this somehow, but in the meantime I suggest you nuke RVM, which is just bad and has always been, and use rbenv.

@mislav mislav added a commit to mislav/homebrew that referenced this issue Jul 6, 2012

@mislav mislav hub: use system rake to avoid RVM's Bundler integration c4b3d9a

mislav referenced this issue in Homebrew/legacy-homebrew Jul 6, 2012

Closed

fixes hub formula for some RVM users #13238

Member

mislav commented Jul 6, 2012

Thanks @LucisFerre for your patience. I have fixed the formula and it's going to Homebrew soon.

The trouble was that simply calling rake install (which the formula does) went through Bundler because of your RVM, and it bugged you with missing dependencies that you don't even need for the rake install task.

Hopefully now I've avoided RVM entirely and rake command goes to your system rake (/usr/bin/rake)

mislav closed this Jul 6, 2012

Thanks, that's awesome. Cheers!

elskwid commented Jul 6, 2012

@mislav, Nice, quick work. Thank you very much!

@adamv adamv added a commit to Homebrew/legacy-homebrew that referenced this issue Jul 7, 2012

@mislav @adamv mislav + adamv hub: use system rake to avoid RVM's Bundler integration
Fixes github/hub#205

Closes #13238.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
660d58e

@eproxus eproxus added a commit to eproxus/homebrew that referenced this issue Jul 18, 2012

@mislav @eproxus mislav + eproxus hub: use system rake to avoid RVM's Bundler integration
Fixes github/hub#205

Closes #13238.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
a18b0b6

@etehtsea etehtsea pushed a commit to etehtsea/formulary that referenced this issue Jul 22, 2012

@mislav @adamv mislav + adamv hub: use system rake to avoid RVM's Bundler integration
Fixes github/hub#205

Closes #13238.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
06288af

@Sharpie Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Sep 12, 2012

@mislav @adamv mislav + adamv hub: use system rake to avoid RVM's Bundler integration
Fixes github/hub#205

Closes #13238.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
b7697ba

@snakeyroc3 snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012

@mislav @adamv mislav + adamv hub: use system rake to avoid RVM's Bundler integration
Fixes github/hub#205

Closes #13238.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
058fab3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment