尝试运行gem install时出错 [英] Error when trying to run gem install
问题描述
我试图在我的开发服务器上运行并运行。这是一个fedora14盒子。我安装了rvm,ruby 1.8.7和rubygems 1.6.2。当我尝试通过gem安装rails时, gem install rails
,出现以下错误:
错误:加载命令:install(LoadError)
无此类文件加载 - zlib
错误:执行gem时...(NameError)
未初始化的常量Gem: :Commands :: InstallCommand
关于发生了什么的任何想法。我对ruby / rubygems / rails 100%全新,并且我对Linux的危险程度足够了解,因此非常感谢任何帮助/建议。
在此先感谢
运行 rvm notes
并安装它告诉你的任何内容( zlib-devel
可能是您需要通过 yum
来安装的软件包之一。您将看到的输出将类似于此:
#对于Ruby(MRI& Ree),您应该安装以下操作系统依赖关系:
ruby:yum install -y gcc-c ++补丁readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel;
yum install -y make bzip2;
yum install -y iconv-devel#注意:对于centos 5.4 final iconv-devel可能不可用:(
I'm trying to get rails up and running on my development server. It's a fedora14 box. I installed rvm, ruby 1.8.7, and rubygems 1.6.2. When I try to install rails via gem, gem install rails
, i get the following error:
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
Any ideas as to what is going on. I'm 100% new to ruby/rubygems/rails and I know enough about Linux to be dangerous so any help/suggestions would be greatly appreciated.
Thanks in advance
Run rvm notes
and install whatever it tells you (zlib-devel
will probably be one of the packages you'll need to install via yum
). The output you'll see will be similar to this:
# For Ruby (MRI & Ree) you should install the following OS dependencies:
ruby: yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel ;
yum install -y make bzip2 ;
yum install -y iconv-devel # NOTE: For centos 5.4 final iconv-devel might not be available :(
这篇关于尝试运行gem install时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!