# Trouble installing rails on CentOS 5.2

**URL:** <https://www.ruby-forum.com/t/trouble-installing-rails-on-centos-5-2/160728>\
**Category:** Rails\
**Created:** [February 19, 2009, 6:54am UTC](https://www.ruby-forum.com/t/trouble-installing-rails-on-centos-5-2/160728 "2009-02-19T06:54:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paryankkansara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@paryankkansara](https://www.ruby-forum.com/u/paryankkansara)\
**Post date:** [February 19, 2009, 6:54am UTC](https://www.ruby-forum.com/t/trouble-installing-rails-on-centos-5-2/160728/1 "2009-02-19T06:54:34Z")

</div>

My PC is running CentOS 5.2 with Ruby 1.8.6 and Ruby-devel package  
installed. I have installed RubyGems by downloading rubygems-1.3.1.tgz  
from [rubyforge.org](http://rubyforge.org).

Now I am trying to install Rails by the following command:

gem install rails

It gives the following error:

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

I have tried installing other gem packages like hpricot, needle. They  
all are installed successfully but I cannot install rails.

Can somebody please give me a way to resolve this?

Thanks  
Paryank

---

<div class="post-metadata">

**Author:** ![paryankkansara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@paryankkansara](https://www.ruby-forum.com/u/paryankkansara)\
**Post date:** [February 19, 2009, 3:48pm UTC](https://www.ruby-forum.com/t/trouble-installing-rails-on-centos-5-2/160728/2 "2009-02-19T15:48:12Z")

</div>

On Wed, Feb 18, 2009 at 11:54 PM, Paryank Kansara \<  
removed\_email\_address@domain.invalid\> wrote:

> ERROR: While executing gem … (Zlib::DataError)  
> incorrect header check
> 
> I have tried installing other gem packages like hpricot, needle. They  
> all are installed successfully but I cannot install rails.
> 
> Can somebody please give me a way to resolve this?
> 
> Thanks  
> Paryank

Are you running 64-bit? If so, do you have both 32-bit and 64-bit zlib  
installed?  
yum list installed

zlib.i386 1.2.3-3  
installed

zlib.x86\_64 1.2.3-3 installed

zlib-devel.i386 1.2.3-3 installed

zlib-devel.x86\_64 1.2.3-3 installed

Cheers–

Charles

---

<div class="post-metadata">

**Author:** ![paryankkansara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@paryankkansara](https://www.ruby-forum.com/u/paryankkansara)\
**Post date:** [February 20, 2009, 5:40am UTC](https://www.ruby-forum.com/t/trouble-installing-rails-on-centos-5-2/160728/3 "2009-02-20T05:40:07Z")

</div>

I am running 32-bit. zlib and zlib-devel are already installed on my PC.
