UPDATE
I also have run
ruby -rzlib -e0
and I get this
/Users/bertuka/.rvm/rubies/ruby-2.4.2/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- zlib (LoadError)
from /Users/bertuka/.rvm/rubies/ruby-2.4.2/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
It seems as if I had a version installed inside another version, but I do not know how to solve it
I tried to uninstall Ruby version 2.4.2 and reinstall it, but I still get the same error
FIRST MESSAGE
I am trying to install compass on my mac to use GRUNT.
When I type the following line on terminal
sudo gem install compass
an error appears
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
I have ruby installed
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
and I tried to run the following command as I see on rbenv installed ruby 2.1.2 cannot load such file -- zlib on MAC OSX 10.9.2
xcode-select --install
But it seems that I already have it installed
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
I don't now how to install zlib and compass correctly to avoid errors.
Sorry for my english, thanks.