# Problems about installing ruby from source on linux

**URL:** <https://www.ruby-forum.com/t/problems-about-installing-ruby-from-source-on-linux/108318>\
**Category:** Rails\
**Created:** [July 2, 2007, 8:24am UTC](https://www.ruby-forum.com/t/problems-about-installing-ruby-from-source-on-linux/108318 "2007-07-02T08:24:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![allen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@allen](https://www.ruby-forum.com/u/allen)\
**Post date:** [July 2, 2007, 8:24am UTC](https://www.ruby-forum.com/t/problems-about-installing-ruby-from-source-on-linux/108318/1 "2007-07-02T08:24:58Z")

</div>

Hi all,

I’m trying to install ruby/ruby on rails from source on ubuntu 7.1.  
I’ve downloaded ruby-1.8.6 and done a successful install into /usr/  
local/ruby. Next, I want to install rubygems without apt-get. So I  
downloaded rubygems, extracted it and tried to run ruby setup.rb. But  
it said that cannot load file “zlib”. I know that zlib is a part of  
the standard ruby distribution and I can find it in [ruby\_sourc\_path]/  
ext/zlib, but it seems that it wasn’t installed into /usr/local/ruby  
as I expected.

I found a file called extmk.rb in [ruby\_source\_path]/ext and thought  
this could help. So I tried to run ruby extmk.rb, but it said that  
cannot load “rbconfig”.

There is an aritcle on the internet saying that I can run extconf.rb  
in [ruby\_sourc\_path]/ext/zlib and then do a make && make install. This  
works for me, but before I can run extconf.rb, I must install  
zlib-1.2.3 manually.

Another problems is that the above approach can only install zlib.  
What if I want to install the whole ruby/ext? I think extmk.rb is the  
point but I just cannot run it successfully?

Any idea on this? Thanks a lot.

allen

---

<div class="post-metadata">

**Author:** ![allen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@allen](https://www.ruby-forum.com/u/allen)\
**Post date:** [July 2, 2007, 11:37am UTC](https://www.ruby-forum.com/t/problems-about-installing-ruby-from-source-on-linux/108318/2 "2007-07-02T11:37:50Z")

</div>

Hi,

I have installed Ruby with apt-get and after that I downloaded rubygems  
without apt-get (I think rubygems is not available through apt-get) and  
ran the ruby setup.rb. This worked fine for me, maybe you should try it  
the same way.  
Cheers

allen wrote:

> Hi all,
> 
> I’m trying to install ruby/ruby on rails from source on ubuntu 7.1.  
> I’ve downloaded ruby-1.8.6 and done a successful install into /usr/  
> local/ruby. Next, I want to install rubygems without apt-get. So I  
> downloaded rubygems, extracted it and tried to run ruby setup.rb. But  
> it said that cannot load file “zlib”. I know that zlib is a part of  
> the standard ruby distribution and I can find it in [ruby\_sourc\_path]/  
> ext/zlib, but it seems that it wasn’t installed into /usr/local/ruby  
> as I expected.
> 
> I found a file called extmk.rb in [ruby\_source\_path]/ext and thought  
> this could help. So I tried to run ruby extmk.rb, but it said that  
> cannot load “rbconfig”.
> 
> There is an aritcle on the internet saying that I can run extconf.rb  
> in [ruby\_sourc\_path]/ext/zlib and then do a make && make install. This  
> works for me, but before I can run extconf.rb, I must install  
> zlib-1.2.3 manually.
> 
> Another problems is that the above approach can only install zlib.  
> What if I want to install the whole ruby/ext? I think extmk.rb is the  
> point but I just cannot run it successfully?
> 
> Any idea on this? Thanks a lot.
> 
> allen
