[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Problem installing gem

Alex Gian

7/7/2006 7:03:00 PM

=BUMP=

No ideas?
It's quite frustrating, the system is running fine on the workstation
atm, but I really need it on the server.

They're both RH9, everything I could think ofhas been checked.
I've tried re-installing... same problem.

Can anyone at least point me to the lines in the rubygems installer that
I should be checking?

Thanks again.

--
Posted via http://www.ruby-....

42 Answers

Austin Ziegler

7/7/2006 7:37:00 PM

0

On 7/7/06, Alex Gian <alexgian@blueyonder.co.uk> wrote:
> =BUMP=

This is not a forum where this is acceptable behaviour to do that.
(Frankly, it's unacceptable behaviour even on web fora, but the
standards for netiquette have always been lower on web fora than
anywhere else.) The so-called "Ruby Forum" is a mailing list gateway.
You just sent a "bump" message to thousands of people and added more
mail to people who don't have time to deal with it. Don't do that
again.

To your problem. How did you install Ruby? If you installed from
source and didn't have zlib and zlib-dev installed when you originally
built, then you probably need to recompile. If you installed from a
package, you might be missing something like ruby-zlib. This is more
common to be missing that on systems where they break Ruby into a
zillion little pieces (Debian), but who knows? RedHat 9 could have a
Stupid Ruby Package Setup, too.

Probably does, given what a POS RH9 is.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Alex Gian

7/8/2006 4:27:00 PM

0

Austin Ziegler wrote:
>> =BUMP=
>
> This is not a forum where this is acceptable behaviour to do that.
Sorry, didn't realise it was a mailer, too - I use it as a web forum.
Wouldn't have done it if I knew. I felt an honest "bump" was more
polite than some contrived reason to post.

> To your problem. How did you install Ruby? If you installed from
> source and didn't have zlib and zlib-dev installed when you originally
> built, then you probably need to recompile.
I installed from source.
Subsequently, I de-installed everything, got the zlibs and zlib-devs
into place and re-compiled. Several times. Tried rubygems-0.9.0, too.
Still nothing (or, rather, still the first error msg)

The irritating thing is that it runs just fine on an almost identical
RH9 setup (which I'm using ATM to get up to speed :) ).

> Probably does, given what a POS RH9 is.
Can't say I share your experience, since my server has been a rock for
me for over 5yrs! This is the _first_ weird installation prob. I've
ever had. I'm just sorry it's so long in the tooth now, I'd like to
keep it going as long as possible. (Ubuntu next, p'haps?)

===

Further with the problem:
The offending line in the err message points to the file:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb at line 27
this looks like:
26> def require(path)
27> gem_original_require path
28> rescue LoadError => load_error

I can't say I really see what it's driving at, though I assume the
message is the "rescued" load error. Anyone konw what this "path" is
supposed to be, and where it should be set?







--
Posted via http://www.ruby-....

Alex Gian

8/5/2006 12:46:00 AM

0

Well, I finally solved it.

After a month of limping along on an auxilliary server, of installing
every version of zlib known to man, and of a lot of swearing, I finally
figued it out!

The problem was that the installation HARDCODED the RELATIVE address of
zlib in relation to the source code during "configure". I had moved the
source directory, considering it to be temporary.

Wow. A hardcoded relative address. Relative to source code. Is that
good practise?

Once I figured it, a reconfigure and rebuild from the new source
location sorted everything... Just mentioning it, cuase it might catch
someone else out, too. Anyway, I'm happy now, everything is working as
it should. Phew!

--
Posted via http://www.ruby-....

Rene Medina

9/27/2006 5:30:00 AM

0

Alex Gian wrote:
> Well, I finally solved it.
>
> After a month of limping along on an auxilliary server, of installing
> every version of zlib known to man, and of a lot of swearing, I finally
> figued it out!
>
> The problem was that the installation HARDCODED the RELATIVE address of
> zlib in relation to the source code during "configure". I had moved the
> source directory, considering it to be temporary.

Would you explain what one have to do to do a correct installation, step
by step, please?

>
> Wow. A hardcoded relative address. Relative to source code. Is that
> good practise?
>
> Once I figured it, a reconfigure and rebuild from the new source
> location sorted everything... Just mentioning it, cuase it might catch
> someone else out, too. Anyway, I'm happy now, everything is working as
> it should. Phew!


--
Posted via http://www.ruby-....

Nick Poulden

12/30/2006 1:26:00 PM

0

Hi all,

I also had this problem, and fixed it by installing ruby-zlib manually.
The source files is available from
http://raa.ruby-lang.org/project.... Simply extract the files,
run ruby extconf.rb, make, make install. Running ruby setup.rb in the
gem source directory then worked fine.

Nick


--
Posted via http://www.ruby-....

Eric Hodel

12/31/2006 12:52:00 AM

0

On Dec 30, 2006, at 05:25, Nick Poulden wrote:
> I also had this problem, and fixed it by installing ruby-zlib
> manually.
> The source files is available from
> http://raa.ruby-lang.org/project.... Simply extract the files,
> run ruby extconf.rb, make, make install. Running ruby setup.rb in the
> gem source directory then worked fine.

No.

zlib is part of ruby since 1.8.

If your ruby doesn't have the zlib libraries file a bug with your
ruby packager.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...

I LIT YOUR GEM ON FIRE!


Lukas Rieder

4/2/2008 4:16:00 PM

0

Hello,

I was struggling with the same problem for about two days.
The final solution was installing ruby-zlib and then reinstalling
rubygems from source. Dunno why...

This is quite strange, because my ruby version is 1.8.6, gem version
1.1.0, zlib and zlib-devel were installed before the installation of
ruby & rubygems.

But after I've installed ruby and rubygems from source I was haunted by
this error when I tried to install rails. (gem i rails
--include-dependencies)

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- zlib (LoadError)

This solved my zlib LoadError issue:

wget http://www.blue.sky.or.jp/atelier/ruby/ruby-zlib-0....
tar xvzf ruby-zlib-0.6.0.tar.gz
cd ruby-zlib-0.6.0
ruby extconf.rb && make && make install

(and reinstall your rubygems from source)

Have a nice day,


Lukas Rieder
--
Posted via http://www.ruby-....

Iphan Iphan

5/21/2008 10:20:00 PM

0

Lukas Rieder wrote:
> Hello,
>
> I was struggling with the same problem for about two days.
> The final solution was installing ruby-zlib and then reinstalling
> rubygems from source. Dunno why...

Just installed ruby 1.8.6 on CentOS 5 in my local directory. It installs
a broken gem by default, which crashes on execution:

/myhome/bin/gem:8:in `require': no such file to load -- rubygems
(LoadError)
from /myhome/bin/gem:8

Reinstalling rubygems 1.1.1 from source as indicated above fixed it.

Thanks Lukas for the tip, much appreciated!


Isabelle
--
Posted via http://www.ruby-....

Kingdon Barrett

9/3/2008 6:31:00 PM

0

For reference, that is obsolete as somebody else mentioned.

On Debian, you can build and install RubyGems as long as you have got
zlib1g-dev before you start your build of Ruby.

Long-dead thread, but it was unresolved...
kingdon@tuesdaystudios.com

Lukas Rieder wrote:
> This solved my zlib LoadError issue:
>
> wget http://www.blue.sky.or.jp/atelier/ruby/ruby-zlib-0....
> tar xvzf ruby-zlib-0.6.0.tar.gz
> cd ruby-zlib-0.6.0
> ruby extconf.rb && make && make install
>
> (and reinstall your rubygems from source)
>
> Have a nice day,
>
>
> Lukas Rieder

--
Posted via http://www.ruby-....

Travis Bell

3/27/2009 11:18:00 PM

0

Lukas Rieder wrote:

> This solved my zlib LoadError issue:
>
> wget http://www.blue.sky.or.jp/atelier/ruby/ruby-zlib-0....
> tar xvzf ruby-zlib-0.6.0.tar.gz
> cd ruby-zlib-0.6.0
> ruby extconf.rb && make && make install
>
> (and reinstall your rubygems from source)

That fixed the issue for me as well. Completely stock CentOS 5 install
(with zlib & zlib-devel)... installed Ruby from source, installed
Rubygems and boom, zlib load error.

Manually installed ruby-zlib, re-installed Rubygems and away we go.

--
Posted via http://www.ruby-....