CRC error installing rails

Hello all,

I’m just getting started with rails. I’m trying to install it
on a CentOS 4.2 (i.e. Red Hat Enterprise 4.2) x86_64 system.

The OS install is brand new. Ruby version is:

ruby --version

ruby 1.8.1 (2003-12-25) [x86_64-linux-gnu]

Gem:

gem --version

0.8.11

When I attempt to install rails, I get this:

gem install rails --include-dependencies

Attempting local installation of ‘rails’
Local gem file not found: rails*.gem
Attempting remote installation of ‘rails’
Updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem … (Zlib::GzipFile::CRCError)
invalid compressed data – crc error

In searching list archives, etc, someone suggested it might
be an issue with i386 vs x86_64 zlib, but the presence of
the i386 zlib (and it’s -devel package) makes no difference
in the error generated.

Also, pulling down the .gem file and trying a local install
produces the same error. :-p

So… what am I doing wrong here? Or what package am I
missing? Any help would be much appreciated!

Thanks,
Cary


Cary Collett - [email protected] - http://cary.ratatosk.org/

Myth is more individual and expresses life more precisely
than does science. – C. G. Jung

This is probably not the direct cause but I’d upgrade your Ruby to
1.8.2 or 1.8.4 whichever is easier for you. I don’t think Ruby 1.8.1
is even a supported version for use with Rails 1.0.

I don’t think the ruby version is the issue. I tried installing
several older versions of Rails (from the 0.13 and 0.14 series)
and get the same error in each case.

Also, there is no RPM for 1.8.2/4 and I’d really rather avoid
having to maintain ruby separately from everything else which
I can maintain via yum and rpm.

Cary

Frank H. ([email protected]) wrote:

on a CentOS 4.2 (i.e. Red Hat Enterprise 4.2) x86_64 system.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Cary Collett - [email protected] - http://cary.ratatosk.org/

Myth is more individual and expresses life more precisely
than does science. – C. G. Jung

Frank H. ([email protected]) wrote:

This is probably not the direct cause but I’d upgrade your Ruby to
1.8.2 or 1.8.4 whichever is easier for you. I don’t think Ruby 1.8.1
is even a supported version for use with Rails 1.0.

Well, interestingly, when I did an install of ruby from source (and
installed gem) it installed rails with no problem.

So, that works at least. Though why the RPM of 1.8.1 can’t install
any version of rails is still a mystery.

Thanks,
Cary

I don’t think Ruby 1.8.1 is causing the CRC problem. Somebody with a
little more experience needs to chip in here. I believe Rails does not
run (fully) on an older Ruby such as version 1.8.1.

What version of Ruby did you install from source?

1.8.4.

If it works with the hand compiled 1.8.4 then why not use that? I’m
using 1.8.4 with Rails 1.0 and it’s been fine from what I’ve seen.
Sure you break RPM integrity (that being bad) but you could optionally
look for a more current version of Ruby. I don’t understand why these
binary based distro’s love to ship old versions software and then
never provide more recent packages. I’ve ran into this alot with
various binary packaged distros which is why I don’t use them anymore.
Source based has provided much more flexibility when it comes to newer
versions of software.

After doing some searching on google I see quite alot of newer
versions of Ruby in various RPM based distros. Maybe you could rebuild
one of the SRC RPM’s for CentOS. I am not sure what problems you may
or may not have with this but if it were me I’d try looking for a RPM
Spec of Ruby and building my own 1.8.4 RPM from that. If one has a RPM
Spec of Ruby then I’m sure it wouldn’t be all that difficult to hand
roll a 1.8.4 RPM, Ruby has few dependencies.

There is a SRC RPM for Ruby 1.8.2 at :

http://rpm.pbone.net/index.php3/stat/15/pakman/4211/com/R%20P%20Herrold%20<info_owlriver_com>.html

Frank H. ([email protected]) wrote:

If it works with the hand compiled 1.8.4 then why not use that? I’m
using 1.8.4 with Rails 1.0 and it’s been fine from what I’ve seen.
Sure you break RPM integrity (that being bad) but you could optionally
look for a more current version of Ruby. I don’t understand why these
binary based distro’s love to ship old versions software and then
never provide more recent packages. I’ve ran into this alot with
various binary packaged distros which is why I don’t use them anymore.
Source based has provided much more flexibility when it comes to newer
versions of software.

I probably will at this point - and I have the same gripe about not
being able to get recent versions.

I understand that they want to create a stable target for third parties,
but they should at least provide the option to keep at lesat
non-critical
stuff current, if you ask me.

Cary

I ended up finding spec file for 1.8.3 for FC3 and was able
to modify that to build the various RPMs for 1.8.4 on
CentOS 4.2-x86_64. The only hitch I ran into was that ruby
refused to find the rbconfig.rb file - apparently because
it was under /usr/lib64 and not /usr/lib. I fixed this
by sym linking /usr/lib/ruby to /usr/lib64/ruby. (Various
fiddles in the .spec file didn’t help with this.)

Once I did that I was able to install gem and then rails
without a hitch.

If anyone wants these RPMs, let me know and I can put
them up somewhere.

Thanks to Frank for the suggestion to do this in the
first place. :slight_smile:

Cary

can you send me the RPM spec file? I want to install Fedora in a
VMware player and I want to have an up to date Ruby. =)

frankhale @ gmail . com

thanks