在 Linux (Ubuntu) 和 Rubygems 下编译 Ruby 1.9.2
我已经在我的主机上成功安装了 Ruby 1.9.2 和 Rubygems。
现在在我的服务器上我再次从事这项工作。
上次我遇到了一个问题,现在也出现了:
gem install rails
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
我知道如何解决这个问题,但忘记了。
我在 stackoverflow 上找到了一篇文章(我再也找不到了),它告诉我首先编译一些本机 ruby 扩展。在源代码中,您必须进入一个目录,您可以在其中找到 zlib、linecache 等的目录。那些你必须编译的东西就完成了:然后一切就可以了。
有人可以再告诉我该怎么做吗?
抱歉,Google 和 Stackoverflow 搜索这次没有帮助。
谢谢。
你的,
乔恩
I already installed Ruby 1.9.2 with Rubygems successfully on my main machine.
Now on my server I'm again in this job.
Last time I had a problem, which came up right now as well:
gem install rails
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
I knew how to fix this, but forgot it.
I found an article here on stackoverflow (which I cannot find again) that tells me to compile some native ruby extension first. In the source code you have to go into a dir, where you find dirs for zlib, linecache and so on. Those you have to compile and you're done: everything then works.
Can somebody tell me again how to do this?
Sorry, Google and the Stackoverflow search didn't help this time.
Thanks.
Yours,
Joern
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我又找到线索了!
有人尝试过安装 ruby & 吗? rubygems from source on ubuntu
在 Evgeny 的第三个答案中,您确切地找到了我正在寻找的内容!
I found the thread again!
Has anyone tried installing ruby & rubygems from source on ubuntu
In the 3rd answer of Evgeny you find exactly what I was searching for!