How to install Rails on CentOS 5.2

Hi

I have installed CentOS 5.2 on my PC. Ruby 1.8.5 and Ruby-devel
packages are already installed. I have downloaded rubygems-1.3.1.tgz
package and installed it. Now I am trying to install Rails by the
command below:

gem install rails

But it gives me the following error:

ERROR: While executing gem ... (Zlib::DataError)
    incorrect header check

zlib and zlib-devel are already installed on my pc. I can install
other gems like hpricot etc. But still I cannot install rails.

Can somebody please guide me how can I install rails on CentOS?

Thank you,
Paryank

Hi Paryank,

Though I have no direct solution for you, I think compile/install Ruby
1.8.7 may solve this problem, while ruby packages on CentOS is obsolete.

Jan

* Paryank <pmkansara@gmail.com> [2009-02-09 21:29:44 -0800]:

Thanks for your help. But it still does not work.

I have downloaded ruby source, compiled and installed. It still gives
the same error!

I do not understand what I am missing!

Here is what I have - it may be a little old now - from notes to get
our CentOS sever running.

INSTALLING RUBY ON RAILS:

Thanks phil,

But I still have the same error.

I have removed my existing ruby package by:

yum remove ruby

And then followed the steps you have mentioned. But when I run command
to install rails first it try to update rubygems. It was taking very
long time. So I have updated rubygems by the following command:

gem update --system

After gem is successfully updated, I tried again to install rails. But
it was giving the same error again:

ERROR: While executing gem ... (Zlib::DataError)
    incorrect header check

Ok,
Here is what I have to prep the box - this may not apply as it depends
on your install, but maybe you can look through here and see.

PREP THE SYSTEM:

I have a pretty good step by step on setting up rails on a GoDaddy
CentOS server: <a
href="http://blog.sonerdy.com/2009/01/setting-up-rails-on-godaddy-centos.html">Setting
up Rails on CentOS</a>

This uses passenger. Hope it helps!