[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Gem Installation problem on Ubuntu

Sam Kong

5/22/2006 5:12:00 PM

Hi!

I'm trying to install ruby, gem, rails on my fresh Ubuntu.
I'm not a Linux expert but have experiences with ruby on Windows and
Mac.

I used apt-get install ruby and it installed ruby 1.8.3 which doesn't
work with rails unfortunately.
So I uninstalled it and manually installed ruby 1.8.4 and it worked
fine.
I downloaded rubygems 0.8.11 and ran ruby setup.rb but had errors like
the following.

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

I searched for the solution of that issue and found the following info
at http://docs.rubygems.org/read...

Debian Linux: Debian does not automatically include all the standard
Ruby libararies in the basic Ruby package. As a result, you may need to
''apt-get'' libyaml-ruby and libzlib-ruby before you can
install rubygems.

So I did apt-get install libyaml-ruby libzlib_ruby and they proceeded
fine.

But I still have the zlib error.
What did I miss?
Additionally, why does Ubuntu install ruby 1.8.3 by default instead of
1.8.4 or 1.8.2?
Whenever I try to get along with linux, such minor things as these get
in the way and keep discouraging me...:-)
(Sorry for whining...)

Any help would be appreciated.

Sam

5 Answers

Sam Kong

5/22/2006 5:14:00 PM

0

Forgot to mention that it's Ubuntu 5.10.

Sam

Sam Kong

5/22/2006 5:33:00 PM

0


Sam Kong wrote:
> Hi!
>
> I'm trying to install ruby, gem, rails on my fresh Ubuntu.
> I'm not a Linux expert but have experiences with ruby on Windows and
> Mac.
>
> I used apt-get install ruby and it installed ruby 1.8.3 which doesn't
> work with rails unfortunately.
> So I uninstalled it and manually installed ruby 1.8.4 and it worked
> fine.
> I downloaded rubygems 0.8.11 and ran ruby setup.rb but had errors like
> the following.
>
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
> 'require__': no such file to load -- zlib (LoadError)
>
> I searched for the solution of that issue and found the following info
> at http://docs.rubygems.org/read...
>
> Debian Linux: Debian does not automatically include all the standard
> Ruby libararies in the basic Ruby package. As a result, you may need to
> ''apt-get'' libyaml-ruby and libzlib-ruby before you can
> install rubygems.
>
> So I did apt-get install libyaml-ruby libzlib_ruby and they proceeded
> fine.
>
> But I still have the zlib error.
> What did I miss?
> Additionally, why does Ubuntu install ruby 1.8.3 by default instead of
> 1.8.4 or 1.8.2?
> Whenever I try to get along with linux, such minor things as these get
> in the way and keep discouraging me...:-)
> (Sorry for whining...)
>
> Any help would be appreciated.
>
> Sam

Never mind.
I solved it.

I reinstalled ruby and it worked.
Probably I had to install libyaml-ruby and libzlib_ruby before I made
ruby.

Sam

Van Dyk, Joe

5/22/2006 8:28:00 PM

0

Sam Kong wrote:
> Hi!
>
> I'm trying to install ruby, gem, rails on my fresh Ubuntu.
> I'm not a Linux expert but have experiences with ruby on Windows and
> Mac.
>
> I used apt-get install ruby and it installed ruby 1.8.3 which doesn't
> work with rails unfortunately.
> So I uninstalled it and manually installed ruby 1.8.4 and it worked
> fine.
> I downloaded rubygems 0.8.11 and ran ruby setup.rb but had errors like
> the following.
>
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
> 'require__': no such file to load -- zlib (LoadError)
>
> I searched for the solution of that issue and found the following info
> at http://docs.rubygems.org/read...
>
> Debian Linux: Debian does not automatically include all the standard
> Ruby libararies in the basic Ruby package. As a result, you may need to
> ''apt-get'' libyaml-ruby and libzlib-ruby before you can
> install rubygems.
>
> So I did apt-get install libyaml-ruby libzlib_ruby and they proceeded
> fine.
>
> But I still have the zlib error.
> What did I miss?
> Additionally, why does Ubuntu install ruby 1.8.3 by default instead of
> 1.8.4 or 1.8.2?
> Whenever I try to get along with linux, such minor things as these get
> in the way and keep discouraging me...:-)
> (Sorry for whining...)
>
> Any help would be appreciated.
>
> Sam
>

Complain to the Debian people please. They are refusing to fix this.

Joe

Lorenzo Breda

5/23/2006 2:42:00 PM

0

Sam Kong wrote:
> Never mind.
> I solved it.
>
> I reinstalled ruby and it worked.
> Probably I had to install libyaml-ruby and libzlib_ruby before I made
> ruby.
>

I have the same problem on a Debian Sarge.
I tried to install libyaml-ruby and libzlib-ruby and to reinstall ruby
(from source), but it don't work.

Can anyone help me?



--
Lorenzo Breda

Jared Richardson

5/24/2006 3:37:00 AM

0



--

"Lorenzo Breda" <lbreda@gmail.com> wrote in message
news:44731f2f$0$29724$4fafbaef@reader2.news.tin.it...
> Sam Kong wrote:
>> Never mind.
>> I solved it.
>>
>> I reinstalled ruby and it worked.
>> Probably I had to install libyaml-ruby and libzlib_ruby before I made
>> ruby.
>>
>
> I have the same problem on a Debian Sarge.
> I tried to install libyaml-ruby and libzlib-ruby and to reinstall ruby
> (from source), but it don't work.
>
> Can anyone help me?
>
>
>
> --
> Lorenzo Breda

I ran into this several months ago. In my case, the Ruby files didn't get
recompiled after I had installed the zlib libraries.

If memory serves, you can cd into (ruby-version)/ext/zlib and "touch *".

When you recompile, the zlib code in Ruby will link with the system zlib
code. You can then do a make install from Ruby and actually get everything
working. Then the gems package can be installed.

Jared
http://JaredRich...