Gem problem installing Rails / Ubuntu Gutsy

J

Jesse Crockett

Axel said:
-------- Original-Nachricht --------


Hi,

you don't have zlib installed. (http://www.zlib.net/)

Best regards,

Axel

Hello, and thank you. I installed zlib using ./configure; make test;
make install, tho I still get the same errors... (?)

for `whereis zlib` : zlib:
for `whatis zlib` : nothing appropriate

Thanks,
Jess
 
J

Jesse Crockett

Mario said:
On Fri, Dec 28, 2007 at 08:55:18AM +0900, Jesse Crockett wrote:

ehm why you use the package managment (apt?) to install gem etc. and
compiling zlib from source? apt-get install zlib1g-dev does it fine.

P.S. I use my ruby environment basically from Ubuntu and all the gem
stuff from the ruby community. So I don't have trouble with the
package management for upgrades in the future.

Greetings
Mario

same problems after apt installing zlib1g-dev

results: http://pastie.caboo.se/132604

further, I installed Ruby and Gems from source (I believe), tho I am a
newb; so, can you please explain your post script to me?

Thanks,
Jess
 
S

Stephen Lewis

same problems after apt installing zlib1g-dev

results: http://pastie.caboo.se/132604

further, I installed Ruby and Gems from source (I believe) ...


If you didn't have the -dev zlib package installed when you compiled
Ruby from source, the Ruby zlib extension can't have been built.

Its a little confusing because two subtly different things share the
same name - a plain old C shared library, and a ruby extension that
uses it. It's the latter part that is being complained about in those
error messages.

Try rebuilding now that you have the -dev package installed, and see
if that helps.

Note that you'll probably find that other extensions bundled with the
interpreter are missing if you don't have the requisite -dev packages
when you build.
 
J

Jesse Crockett

Stephen said:
If you didn't have the -dev zlib package installed when you compiled
Ruby from source, the Ruby zlib extension can't have been built.

Its a little confusing because two subtly different things share the
same name - a plain old C shared library, and a ruby extension that
uses it. It's the latter part that is being complained about in those
error messages.

Try rebuilding now that you have the -dev package installed, and see
if that helps.

Note that you'll probably find that other extensions bundled with the
interpreter are missing if you don't have the requisite -dev packages
when you build.

Whoa. I am confused. Thanks so much for helping, but nothing seems to
work. I had a similar problem with MySQL, and it turned out all I had
to do was reboot.

this is all i can think to do: whereis zlib
zlib: /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz

Say I want to start from scratch. Can this be done without a fresh OS
install?
 
M

michael greenly

[Note: parts of this message were removed to make it a legal post.]

It really shouldn't be a problem to start over.

Find all the ruby packages installed with
$> dpkg -l | grep -i ruby

Then remove each of them
$> sudo apt-get remove --purge ruby rdoc rubygems rails (etc...)

Then reinstall.

These days I'm really not sure what to recommend to people in terms of how
to install ruby and gems on ubuntu.

Usually I run my production machines with Ruby and Gems from apt and Rails
from Gems. Which would require something like....
$> sudo apt-get install ruby rdoc ri ruby-extras ruby-gems
$> sudo gem install rails

Doing it from source (especially if it's a development machine) is really
easy also. The trick in Ubuntu is to use apt to install all the
dependencies before building the source package. So you'd do something
like...
$> sudo apt-get build-dep ruby rdoc ri ruby-extras ruby-gems

Then download and install the source packages.

The same trick works with the database gems. If your going to install the
mysql, postgres or sqlite gem install their coresponding apt package
dependencies first, then the gem
$> sudo apt-get build-dep libmysql-ruby1.8 libsqlite3-ruby1.8
libpgsql-ruby1.8
$> gem install mysql sqlite postgres


I just made a blog post about running all three side by side that may help
also.

http://blog.michaelgreenly.com/2007/12/multiple-ruby-version-on-ubuntu.html
 
J

Jesse Crockett

Michael said:
. . . .

I just made a blog post about running all three side by side that may
help
also.

http://blog.michaelgreenly.com/2007/12/multiple-ruby-version-on-ubuntu.html

Thanks so much. In the meantime I had solved it for my purposes.

1) sudo apt-get install --reinstall zlib1g zlib1g-dev
2) in ~/ruby-1.8.6/ __ sudo ./configure; sudo make; sudo make install
3) in ~/rubygems-1.0.1/ __ sudo ruby setup.rb

ruby -v returns 1.8.6
gem -v returns 1.0.1

sudo gem update --system __ works
sudo gem install rails __ works

Yay !
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top