[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Problem installing rubygems

Andreas Habel

6/13/2005 8:40:00 PM

After downloading the latest sources of ruby-gems 8.10 and
> ruby setup.rb all
I ran into errors in post_install.rb. I`ve located the position in code
and reproduced the error in irb:
Any ideas ?
btw. running SuSE 9.3

thanks,
Andreas

-------

def install_sources
$: << "lib"
require 'rubygems'
Gem::manage_gems
Dir.chdir("pkgs/sources") do
load "sources.gemspec"
spec = Gem.sources_spec
gem_file = Gem::Builder.new(spec).build
Gem::Installer.new(gem_file).install(true, Gem.dir, false)
end
end

-------

irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> Gem::manage_gems
LoadError: No such file to load -- zlib
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:9
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/builder.rb:1
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:61:in
`manage_gems'
from (irb):2



2 Answers

Jim Weirich

6/14/2005 1:15:00 AM

0

On Monday 13 June 2005 04:40 pm, Andreas Habel wrote:
> After downloading the latest sources of ruby-gems 8.10 and
>
> > ruby setup.rb all
>
> I ran into errors in post_install.rb. I`ve located the position in code
> and reproduced the error in irb:
> Any ideas ?
> btw. running SuSE 9.3

I don't think I've seen this issue in SuSE before. This is a common problem
in system that don't bundle zlib with the base ruby installation (or building
from source on systems that don't have the zipping libraries).

You can test this by typing "require 'zlib'" in irb.

See also http://docs.rubygems.org/read/chapter... (although the entry
is a bit brief).

--
-- Jim Weirich jim@weirichhouse.org http://onest...
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)


Andreas Habel

6/15/2005 6:40:00 PM

0

Jim Weirich wrote:
>
> I don't think I've seen this issue in SuSE before. This is a common problem
> in system that don't bundle zlib with the base ruby installation (or building
> from source on systems that don't have the zipping libraries).
>
> You can test this by typing "require 'zlib'" in irb.
>
> See also http://docs.rubygems.org/read/chapter... (although the entry
> is a bit brief).
>
Thanks for your help. I build ruby from source and zlib-devel wasn`t
installed because my DVD was only SuSE 9.3 personal ;-(

Now everything works fine!

Andreas