Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

installing rails with gem , error loading command : install undefined method 'invoke_with_build_args`

I'm try to install rails on Debian. when run this command

gem install rails

I gave this 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

even when I try this command: gem install I gave this 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

I used this link to build ruby from sources ruby 2.1.2 build instruction

what can I do to overcome this error?

like image 648
Esterlinkof Avatar asked Nov 15 '14 15:11

Esterlinkof


1 Answers

For who compile from source, they must checked dependencies. I think you need to install this library :

sudo apt-get install libssl-dev

Then you must recompiled ruby and everything worked.

like image 136
Mohammad Hasan Shabani Avatar answered Oct 06 '22 00:10

Mohammad Hasan Shabani