Error with gems 1.2.0 on ubuntu hardy

B

Bruno Moura

First I apologize my poor English.

After to install the ruby 1.8.7 patch level 22 on ubuntu 8.04 hardy
succefully.Then I tryed to install rubygems 1.2 in sequence and I
received this error message:

xyz@xyz: /usr/local/src/rubygems-1.2.0$ sudo ruby setup.rb
/lib/rubygems/spec_fetcher.rb:1:in `require': no such file to load --
zlib (LoadError)

How Can I fix this problem? Everyone had this experience?

Thank's so much for help me!


Bruno
 
B

Brian Candler

Bruno said:
After to install the ruby 1.8.7 patch level 22 on ubuntu 8.04 hardy
succefully.Then I tryed to install rubygems 1.2 in sequence and I
received this error message:

xyz@xyz: /usr/local/src/rubygems-1.2.0$ sudo ruby setup.rb
/lib/rubygems/spec_fetcher.rb:1:in `require': no such file to load --
zlib (LoadError)

How Can I fix this problem? Everyone had this experience?

You need to compile and install ruby again from source, but this time
with the zlib development package installed (I think it's called
"zlib1g-dev" or something like that; I don't have an Ubuntu machine
handy right now)

This is so that Ruby can build its own zlib extension.
 
B

Bruno Moura

Thank's but After zlib1g libs installation the problem has not solved

And I didn't unistall ruby

I tried many kind of commands like for uninstall and re-compile ruby:

sudo apt-get remove ruby libruby libruby1.8 ruby1.8 irb rdoc ri
sudo aptitude remove ruby
sudo dpkg --list | grep ruby, dpkg -r
and through Synaptic too

and when I invoke ruby or irb, this commands works normally...
 
B

Brian Candler

Bruno said:
Thank's but After zlib1g libs installation the problem has not solved
zlib1g-dev

And I didn't unistall ruby

I imagine you compiled ruby 1.8.7 from source, as it's not a standard
Hardy package. If not, how did you install it? Was it from some
non-standard repository? If so, perhaps their package is broken.
 
B

Bruno Moura

Thanks again Brian

I compiled ruby from source in the first time.

sudo apt-get install gcc g++ build-essential
cd /usr/src
sudo wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p22.tar.bz2
sudo tar -jxvf ruby-1.8.7-p22.tar.bz2
cd /ruby-1.8.7-p22
sudo ./configure
sudo make
sudo make install

ruby -v

ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-linux]) ...it's ok

cd /usr/src
sudo wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
sudo tar -zxvf rubygems-1.2.0.tgz
cd rubygems-1.2.0
sudo ruby setup.rb

Doesn't work...


After I install using

sudo apt-get install ruby rdoc ri irb libyaml-ruby libzlib-ruby ri
ruby1.8-dev

or

sudo apt-get remove ruby rdoc ri irb libyaml-ruby libzlib-ruby ri
ruby1.8-dev

sudo apt-get install ruby rubygems irb ri rdoc ruby1.8-dev
build-essential

or

sudo apt-get autoremove ruby ruby rubygems irb ri rdoc ruby1.8-dev

sudo apt-get install -y ruby1.8 ri1.8 rdoc1.8 rake irb1.8
 
B

Brian Candler

Bruno said:
sudo ./configure
sudo make
sudo make install

ruby -v

ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-linux]) ...it's ok

Now look in ext/zlib/mkmf.log - that will probably tell you why the zlib
extension isn't being built. Post it here if it doesn't make sense.

Do you definitely have the zlib1g-dev package installed?

Hmm, perhaps you also need libssl-dev installed. Try that.
 
B

Bruno Moura

Brian, I followed this tutorial and gotcha!

works!


http://blog.fiveruns.com/2008/3/3/compiling-ruby-rubygems-and-rails-on-ubuntu

Thanks so much Brian

Some day I hope to contribute too witch this community !

Thanks so much!

Bruno said:
Thanks again Brian

I compiled ruby from source in the first time.

sudo apt-get install gcc g++ build-essential
cd /usr/src
sudo wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p22.tar.bz2
sudo tar -jxvf ruby-1.8.7-p22.tar.bz2
cd /ruby-1.8.7-p22
sudo ./configure
sudo make
sudo make install

ruby -v

ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-linux]) ...it's ok

cd /usr/src
sudo wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
sudo tar -zxvf rubygems-1.2.0.tgz
cd rubygems-1.2.0
sudo ruby setup.rb

Doesn't work...


After I install using

sudo apt-get install ruby rdoc ri irb libyaml-ruby libzlib-ruby ri
ruby1.8-dev

or

sudo apt-get remove ruby rdoc ri irb libyaml-ruby libzlib-ruby ri
ruby1.8-dev

sudo apt-get install ruby rubygems irb ri rdoc ruby1.8-dev
build-essential

or

sudo apt-get autoremove ruby ruby rubygems irb ri rdoc ruby1.8-dev

sudo apt-get install -y ruby1.8 ri1.8 rdoc1.8 rake irb1.8




Brian said:
I imagine you compiled ruby 1.8.7 from source, as it's not a standard
Hardy package. If not, how did you install it? Was it from some
non-standard repository? If so, perhaps their package is broken.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top