From: Colby Callahan Date: 2013-02-07T03:19:55+09:00 Subject: Re: error: cannot load such file — zlib --00151743f7785a77ff04d5125fb1 Content-Type: text/plain; charset=ISO-8859-1 restart machine... On Wed, Feb 6, 2013 at 5:50 AM, Efe A. wrote: > When i try to install rails in Ubuntu 12.10 i get this error: > > [CODE] $ gem install rails > ERROR: Loading command: install (LoadError) > cannot load such file -- zlib > ERROR: While executing gem ... (NameError) > uninitialized constant Gem::Commands::InstallCommand[/CODE] > > So i completely removed rvm: > > [CODE]rvm implode > sudo rm -rf ~/.rvm[/CODE]removed the script calls in my .bashrc and > .bash_profile > > and checked if they're really removed: > > [CODE]env | grep rvm #no output, so rvm is removed > ruby -v #The program 'ruby' can be found in the following packages: > blabla[/CODE] > > I already have these via sudo apt-get install: > > [CODE]curl zlib1g-dev zlib1g libssl-dev build-essential openssl > libreadline6 libreadline6-dev curl git-core libyaml-dev libsqlite3-dev > sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake > libtool bison subversion pkg-config[/CODE] > > Then proceed to install from scratch > > [CODE]curl -L https://get.rvm.io | bash -s stable --ruby > --auto-dotfiles[/CODE] > > then run that line and restarted terminal regard to this message: > > [CODE]* To start using RVM you need to run `source > /home/adige/.rvm/scripts/rvm` > in all your open shell windows, in rare cases you need to reopen > all shell windows.[/CODE] > > Then > > [CODE]rvm pkg install readline[/CODE] > > but completed with error: > > [CODE]... > Error running 'autoreconf -is --force', please read > /home/adige/.rvm/log/readline/autoreconf.log > ... > Please note that it's required to reinstall all rubies: > > rvm reinstall all --force[/CODE] > > I think it's installed anyway, right? Before reinstall all rubies, i > installed zlib of course: > > [CODE]# w/out verify, it gives checksum error > rvm pkg install zlib --verify-downloads 1[/CODE] > > Then run > > [CODE]rvm reinstall all --force[/CODE] > > and completed with error again: > > [CODE]... > Install of ruby-1.9.3-p374 - #complete > Making gemset ruby-1.9.3-p374 pristine. > Error running '' under , > please read /home/adige/.rvm/log/ruby-1.9.3-p374/gemset.pristine.log > Making gemset ruby-1.9.3-p374@global > pristine.[/CODE] > > gemset.pristine.log: http://pastebin.com/ZrmWStNB > > Then reinstall ruby with zlib support: > > [CODE]rvm reinstall 1.9.3-p374 --with-zlib-dir=$rvm_path/usr[/CODE] > > which returned same error and same log(http://pastebin.com/ZrmWStNB) but > completed anyway. > > Finally i tried to install rails gem again but > > [CODE]cannot load such file -- zlib ![/CODE] > > Here is the rvm info: http://pastebin.com/08fp9PVW > > What am i doing wrong? > > -- > Posted via http://www.ruby-forum.com/. > > --00151743f7785a77ff04d5125fb1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
restart machine...

On Wed, Feb 6, 2013 at 5:50 AM, Efe A. <lis= ts@ruby-forum.com> wrote:
When i try to install rails in Ubuntu 12.10 = i get this error:

[CODE] =A0 =A0$ gem install rails
=A0 =A0 ERROR: Loading command: install (LoadError)
=A0 =A0 cannot load such file -- zlib
=A0 =A0 ERROR: While executing gem ... (NameError)
=A0 =A0 uninitialized constant Gem::Commands::InstallCommand[/CODE]

So i completely removed rvm:

[CODE]rvm implode
=A0 =A0 sudo rm -rf ~/.rvm[/CODE]removed the script calls in my .bashrc and=
.bash_profile

and checked if they're really removed:

[CODE]env | grep rvm #no output, so rvm is removed
=A0 =A0 ruby -v #The program 'ruby' can be found in the following p= ackages:
blabla[/CODE]

I already have these via sudo apt-get install:

[CODE]curl zlib1g-dev zlib1g libssl-dev build-essential openssl
libreadline6 libreadline6-dev curl git-core libyaml-dev libsqlite3-dev
sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake
libtool bison subversion pkg-config[/CODE]

Then proceed to install from scratch

[CODE]curl -L https://get.= rvm.io | bash -s stable --ruby
--auto-dotfiles[/CODE]

then run that line and restarted terminal regard to this message:

[CODE]* To start using RVM you need to run `source
/home/adige/.rvm/scripts/rvm`
=A0 =A0 =A0 =A0 in all your open shell windows, in rare cases you need to r= eopen
all shell windows.[/CODE]

Then

[CODE]rvm pkg install readline[/CODE]

but completed with error:

[CODE]...
=A0 =A0 Error running 'autoreconf -is --force', please read
/home/adige/.rvm/log/readline/autoreconf.log
=A0 =A0 ...
=A0 =A0 Please note that it's required to reinstall all rubies:

=A0 =A0 =A0 =A0 rvm reinstall all --force[/CODE]

I think it's installed anyway, right? Before reinstall all rubies, i installed zlib of course:

[CODE]# w/out verify, it gives checksum error
=A0 =A0 rvm pkg install zlib --verify-downloads 1[/CODE]

Then run

[CODE]rvm reinstall all --force[/CODE]

and completed with error again:

[CODE]...
=A0 =A0 Install of ruby-1.9.3-p374 - #complete
=A0 =A0 Making gemset ruby-1.9.3-p374 pristine.
=A0 =A0 Error running '' under ,
=A0 =A0 please read /home/adige/.rvm/log/ruby-1.9.3-p374/gemset.pristine.lo= g
=A0 =A0 Making gemset ruby-1.9.3-p374@global
pristine.[/CODE]

gemset.pristine.log: http://pastebin.com/ZrmWStNB

Then reinstall ruby with zlib support:

[CODE]rvm reinstall 1.9.3-p374 --with-zlib-dir=3D$rvm_path/usr[/CODE]

which returned same error and same log(http://pastebin.com/ZrmWStNB) but
completed anyway.

Finally i tried to install rails gem again but

[CODE]cannot load such file -- zlib ![/CODE]

Here is the rvm info: http://pastebin.com/08fp9PVW

What am i doing wrong?

--
Posted via http://= www.ruby-forum.com/.


--00151743f7785a77ff04d5125fb1--