0

I have a Debian 8 Jessie server and I've compiled Ruby sources (https://www.ruby-lang.org/en/documentation/installation/#building-from-source).

When I check the version of ruby with ruby -v, I have a correct output ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]

However, when I run the following command: gem install rails, I have the following error message:

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

Does anyone have the solution?

Pierre P.
  • 1,055
  • 2
  • 14
  • 26
  • 2
    Have you tried `sudo apt-get install zlib1g-dev` – Eyeslandic Feb 24 '17 at 20:15
  • Based on this http://stackoverflow.com/questions/9727908/cannot-load-such-file-zlib-even-after-using-rvm-pkg-install-zlib i think you should download zlib1g and then rebuild ruby – Cezar Azevedo de Faveri Feb 24 '17 at 23:29
  • Hello, i've installed zlib1g-dev as you guys suggested and recompiled ruby sources - but i've still got the same problem. Ruby is installed in the following directory `/usr/bin/ruby` – Pierre P. Feb 25 '17 at 19:40

0 Answers0