1

I am new to Linux and Ruby. I have been searching for an answer but to no avail.

Using OpenSUSE 11.1

I recently downloaded the latest Ruby 1.9.2 and use the method make install from the source. I did not have the zlib back then.

Now, I cannot use the command "gem -d list ruby". The error says no such file to load -- zlib. I wanted to remove Ruby and RubyGem entirely from the system.

I tried using RVM but i couldn't figure it out on how to use. Been trying to install it for ages, but it is still useless, as the "type rvm | head -n1" comes out to rvm is hashed (usr/local/rvm/bin/rvm) even though I added the "[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session" to both .bash_profile and .bashrc.

Been working on it whole night. Any help is appreciated. Thanks in advance. :)

4

1 回答 1

1

我遇到了完全相同的问题,使用 RVM 在 openSUSE 11.4 上安装了 Ruby 1.9.2。这是 openSUSE 的全新安装,我正在尝试设置 Rails 开发环境。

为了解决这个问题,我使用以下方法删除了我的 1.9.2 实例:

rvm uninstall 1.9.2

然后,我使用以下命令安装了 zlib-devel 和 openssl:

sudo zypper install zlib-devel openssl

然后我不得不从 rvm 的 src 文件夹中删除 1.9.2 源文件。这可以在 ~/.rvm/src 下找到

ruby 1.9.2、rubygems 和 yaml 的源代码在那里。我删除了所有三个,将 ~/.rvm/src/rvm 文件夹留在那里,以防 rvm 需要它。

最后,我使用以下命令重新安装了 ruby​​ 1.9.2:

rvm install 1.9.2

Gems 在那之后工作,我能够进行 gem update --system 和 gem install rails 。

我希望这有帮助。我看到这是一个古老的、悬而未决的问题。

麦克风

于 2011-10-07T17:58:22.390 回答