In my attempt to find a solution for this other problem I got frustrated and just removed my Ruby installation with rm -rf ~/.rbenv/versions/2.2.2
. Upon reinstalling it with rbenv install 2.2.2
I've found that suddenly I'm unable to install the bundler
gem. The gem install bundler
command results in the following error:
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
Everything I've read seems to indicate that a missing zlib
package is normally a problem for Linux systems. However, I'm using OSX 10.10.4 and I've read that zlib
is supposed to come with Command Lines Tools, which I have.
After a bunch of googling and no progress I decided to start over with rbenv. I uninstalled rbenv and reinstalled it but I'm still unable to install bundler with my rbenv installation of ruby 2.2.2. What's more, I've found that I'm unable to install versions 2.2.0 or 2.2.1 at all:
MacBook-Pro:~ me$ rbenv install 2.2.0
Downloading ruby-2.2.0.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc
Installing ruby-2.2.0...
BUILD FAILED (OS X 10.10.4 using ruby-build 20150519)
Inspect or clean up the working tree at /var/folders/rm/38vbv5g952s54r1txrmrdlf40000gn/T/ruby-build.20150705212307.49958
Results logged to /var/folders/rm/38vbv5g952s54r1txrmrdlf40000gn/T/ruby-build.20150705212307.49958.log
Last 10 log lines:
from /private/var/folders/rm/38vbv5g952s54r1txrmrdlf40000gn/T/ruby-build.20150705212307.49958/ruby-2.2.0/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /private/var/folders/rm/38vbv5g952s54r1txrmrdlf40000gn/T/ruby-build.20150705212307.49958/ruby-2.2.0/lib/rubygems.rb:556:in `install'
from ./tool/rbinstall.rb:717:in `block (2 levels) in <main>'
from ./tool/rbinstall.rb:716:in `each'
from ./tool/rbinstall.rb:716:in `block in <main>'
from ./tool/rbinstall.rb:749:in `call'
from ./tool/rbinstall.rb:749:in `block in <main>'
from ./tool/rbinstall.rb:746:in `each'
from ./tool/rbinstall.rb:746:in `<main>'
make: *** [do-install-all] Error 1
I'm totally out of ideas and would appreciate any help if anyone thinks they might know what is going on. My dev environment is pretty much totally hosed at this point.
EDIT
Output from running brew doctor
:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libatk-1.0.0.2209.1.dylib
/usr/local/lib/libgdk-x11-2.0.0.1200.0.dylib
/usr/local/lib/libgdk_pixbuf-2.0.0.1200.0.dylib
/usr/local/lib/libgdk_pixbuf_xlib-2.0.0.1200.0.dylib
/usr/local/lib/libgio-2.0.0.0.0.dylib
/usr/local/lib/libGLEW.1.5.4.dylib
/usr/local/lib/libglib-2.0.0.1600.0.dylib
/usr/local/lib/libgmodule-2.0.0.1600.0.dylib
/usr/local/lib/libgobject-2.0.0.1600.0.dylib
/usr/local/lib/libgthread-2.0.0.1600.0.dylib
/usr/local/lib/libgtk-x11-2.0.0.1200.0.dylib
/usr/local/lib/libintl.8.0.2.dylib
/usr/local/lib/libjpeg.62.dylib
/usr/local/lib/libpango-1.0.0.2100.0.dylib
/usr/local/lib/libpangocairo-1.0.0.2100.0.dylib
/usr/local/lib/libpangoft2-1.0.0.2100.0.dylib
/usr/local/lib/libpangox-1.0.0.2100.0.dylib
/usr/local/lib/libpangoxft-1.0.0.2100.0.dylib
/usr/local/lib/libportaudio.2.0.0.dylib
/usr/local/lib/libSDL-1.2.0.dylib
/usr/local/lib/libz.1.2.5.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libatk-1.0.la
/usr/local/lib/libgdk-x11-2.0.la
/usr/local/lib/libgdk_pixbuf-2.0.la
/usr/local/lib/libgdk_pixbuf_xlib-2.0.la
/usr/local/lib/libgio-2.0.la
/usr/local/lib/libglib-2.0.la
/usr/local/lib/libgmodule-2.0.la
/usr/local/lib/libgobject-2.0.la
/usr/local/lib/libgthread-2.0.la
/usr/local/lib/libgtk-x11-2.0.la
/usr/local/lib/libintl.la
/usr/local/lib/libjpeg.la
/usr/local/lib/libpango-1.0.la
/usr/local/lib/libpangocairo-1.0.la
/usr/local/lib/libpangoft2-1.0.la
/usr/local/lib/libpangox-1.0.la
/usr/local/lib/libpangoxft-1.0.la
/usr/local/lib/libportaudio.la
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected static libraries:
/usr/local/lib/libintl.a
/usr/local/lib/libjpeg.a
/usr/local/lib/libportaudio.a
/usr/local/lib/libz.a
It turns out that either a) something happened to my Xcode installation (not sure what/how it would've happened) or b) a manual update of Xcode is necessary after upgrade after upgrading OSX.
Even though I had upgraded Command Line Tools I decided to check my Xcode installation in the App Store and noticed that it was possible to install/update. So I did that and then everything worked fine.