[英]installing rails with gem , error loading command : install undefined method 'invoke_with_build_args`
I'm try to install rails on Debian. 我试着在Debian上安装rails。 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: 即使我尝试这个命令: gem install
我也给出了这个错误:
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 我使用这个链接从源代码ruby 2.1.2构建指令构建ruby
what can I do to overcome this error? 我该怎么做才能克服这个错误?
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. 然后你必须重新编译ruby,一切正常。
You need to install the zlib
development headers. 您需要安装zlib
开发标头。
Refer to your OS's package manager instructions on how to do this. 有关如何执行此操作,请参阅操作系统的软件包管理器说明。
On a RedHat
derivative it would look something like this: 在RedHat
衍生物上,它看起来像这样:
sudo yum install zlib-devel
For ubuntu: 对于ubuntu:
sudo apt-get install zlib1g-dev
Hope this helps 希望这可以帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.