3

I'm install ruby 2.1.2 via rbenv, and rbenv is installed by homebrew on my MAC OSX 10.9.2, ruby global is successful set to 2.1.2, but when i try to run gem install, get some errors below.

MacBook-Pro:~ user1$ gem install bundler
ERROR:  Loading command: install (LoadError)
    cannot load such file -- zlib
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

How to solve it, does anyone faced same problems before?

atom2ueki
  • 837
  • 4
  • 15
  • 32

1 Answers1

1

You need to install the zlib development headers.

xcode-select --install

In OS X 10.9, the command line developer tools are now installed on demand. So after running this also zlib and zlib-devel should be available.

rastasheep
  • 10,416
  • 3
  • 27
  • 37