简体   繁体   中英

Installing Ruby on Ubuntu 10.10 using RVM, problem with gem

I've decided to start fresh with ubuntu 10.10. I started with installing git and then installing rvm from the git repo. everything worked fine and I compiled and install ruby 1.8.7 and ruby 1.9.2
the gem is also installed and I run gem -v
but when run gem list or gem install rake I get the following error

ERROR:  Loading command: list (LoadError)
no such file to load -- zlib
ERROR:  While executing gem ... (NameError)
uninitialized constant Gem::Commands::ListCommand

any idea how to solve this issue? I also tried sudo apt-get install zlib1g zlib1g-dev build-essential libpq-dev with no luck

When using rvm you can simple do steps that are shown here: link text

$ rvm pkg install zlib (or, older format, rvm package install zlib )

$ rvm remove 1.9.2
$ rvm install 1.9.2 --with-zlib-dir=~/.rvm/usr

或者,如果使用 rvm,只需在安装 zlib1g-dev 后重新安装 ruby​​ 版本。

Try the following in your Ruby source after installing zlib1g-dev:

cd ext/zlib
ruby extconf.rb
make
sudo make install

Also see: https://rbjl.janlelis.com/19-rubybuntu-1-installing-ruby-and-rails-on-ubuntu

First implode your rvm and try following steps in this link. might help you This might help you. http://www.jaikeerthi.in/2010/11/install-rails-ubuntu/

Please also see https://github.com/wayneeseguin/rvm/issues/420

I went through personally and verified installation capabilities on multiple distributions and platforms to make sure the process worked as expected.

The key thing to take away from this is: before you attempt to install Ruby versions under RVM, you should read theRuby 版本之前,您应该阅读

rvm notes

command as this contains information that is displayed based on the platform you are currently running. This gives you the list of minimalistic requirements for all versions of a specific Ruby that you will need to install from your package manager. Keep in mind that if you plan on using several different versions like, say, an RBX ruby, an MRI ('normal' ruby), or a REE then you should install all those additional prerequisites taking care to carefully read the notes list.

When you first install, or after every upgrade, be sure to execute:首次安装时或每次升级后,请务必执行:

rvm notes

each and every time you upgrade as we place important information regarding gotchas and requirements, as well as workarounds, here. We will be creating a 'issues' command for RVM shortly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM