When trying to update, an error of incompatibility of Zlib versions occurs.

$ gem update --system ERROR: While executing gem ... (Zlib::VersionError) incompatible version 

ruby now installed via rvm . Version 2.5.1 .

Through brew all versions of ruby removed.

Through the same brew installed libraries lzlib , zlib , libzip , libtool (all that google).

    1 answer 1

    Removed zlib from brew :

     brew uninstall --force zlib 

    Install zlib from source :

     tar xvf <архив> cd <распакованный архив> ./configure make make install 

    Then reinstalled ruby:

     rvm reinstall ruby-2.5.1 

    This answer helped.

    • one
      @SergeyGlazirin accepted. - Alexandr Sysoev