# Getting Ruby

**URL:** <https://www.ruby-forum.com/t/getting-ruby/106721>\
**Category:** Ruby\
**Created:** [June 13, 2007, 4:17pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721 "2007-06-13T16:17:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [June 13, 2007, 4:17pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721/1 "2007-06-13T16:17:19Z")

</div>

Given that Debian and UBUNTU break ruby up into a multitude of sub  
installs, I think the comment below from

[Download Ruby](http://www.ruby-lang.org/en/downloads/)

can be misleading to new users.

```
    However, on some platforms, there are package management 

```

solutions that make installing Ruby extremely easy.

```
    For example, on Debian or Ubuntu apt-get provides an easy and 

```

elegant solution:

```
    % sudo apt-get install ruby irb rdoc

    For irb and rdoc you will need to enable the universe
    repository.

```

Many people will not read the description where it states

```
    On Debian, Ruby 1.8 is provided as separate packages. You can
    get
    full Ruby 1.8 distribution by installing following packages.

      ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp
      ruby1.8-examples libdbm-ruby1.8 libgdbm-ruby1.8
    libtcltk-ruby1.8
      libopenssl-ruby1.8 libreadline-ruby1.8

```

apt-get install ruby only installs  
/usr/bin/ruby1.8  
/usr/bin/erb1.8  
/usr/bin/testrb1.8  
/usr/share  
/usr/share/man  
/usr/share/man/man1  
/usr/share/man/man1/erb1.8.1.gz  
/usr/share/man/man1/ruby1.8.1.gz  
/usr/share/man/man1/testrb1.8.1.gz  
/usr/share/doc  
/usr/share/doc/ruby1.8  
/usr/share/doc/ruby1.8/NEWS.Debian.gz  
/usr/share/doc/ruby1.8/changelog.gz  
/usr/share/doc/ruby1.8/LEGAL.gz  
/usr/share/doc/ruby1.8/COPYING  
/usr/share/doc/ruby1.8/COPYING.ja  
/usr/share/doc/ruby1.8/ToDo.gz  
/usr/share/doc/ruby1.8/README  
/usr/share/doc/ruby1.8/README.ja  
/usr/share/doc/ruby1.8/README.Debian  
/usr/share/doc/ruby1.8/copyright  
/usr/share/doc/ruby1.8/changelog.Debian.gz  
/usr/share/doc/ruby1.8/NEWS.gz

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [June 13, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721/2 "2007-06-13T17:06:28Z")

</div>

On a related topic, it turns out that if you try to compile ruby  
from source, it won’t work unless you already have ruby installed.  
I tried it yesterday, on an ubuntu fiesty box that didn’t have  
ruby installed, and the build stopped with an error, because in  
one place, a script tries to invoke ruby. It wasn’t a huge problem  
for me, because I was able to install the ruby 1.8 package using  
apt, and then continue compiling 1.9. But presumably there are some  
people out there who are compiling ruby because they can’t get a  
binary (e.g., people using unusual operating systems or cpu  
architectures), and it would be a problem for them.

I also feel that the testing after the compile is through is a  
little excessive. My old laptop compiled ruby in an hour or two  
yesterday afternoon, but the test suite is still running this  
morning.

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [June 13, 2007, 5:25pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721/3 "2007-06-13T17:25:33Z")

</div>

On 6/13/07, Ben C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On a related topic, it turns out that if you try to compile ruby  
> from source, it won’t work unless you already have ruby installed.  
> I tried it yesterday, on an ubuntu fiesty box that didn’t have  
> ruby installed, and the build stopped with an error, because in  
> one place, a script tries to invoke ruby.

That’s not been the case for me installing on Ubuntu, where I only  
ever use sources. That said, I’m talking about the general releases  
(1.8.6, etc) and not development builds.

Usually all that’s required from a bare install is the usual “apt-get  
build-essential” and then the ./configure, make, make install combo on  
the Ruby source… generally works a treat 🙂

That said, it’s been a month or two since I last did it, and I’m  
actually installing Ubuntu on a new machine now, so I’ll post here  
again if anything’s different from what I said 😉

Cheers,  
Peter C.

> **[Ruby Inside: The Ruby Blog](http://www.rubyinside.com/)**
>
> The biggest Ruby and Rails blog since 2006 - tutorials, news, and lots more

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [June 13, 2007, 5:31pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721/4 "2007-06-13T17:31:34Z")

</div>

On Wed, 13 Jun 2007 08:02:39 -0700, Ben C. wrote:

> On a related topic, it turns out that if you try to compile ruby from  
> source, it won’t work unless you already have ruby installed.

FYI, it compiles fine on Gentoo:

# ruby -v

ruby 1.8.6 (2007-06-07 patchlevel 36) [i686-linux]

# ruby -v

ruby 1.8.6 (2007-06-07 patchlevel 36) [x86\_64-linux]

# ruby -v

ruby 1.8.6 (2007-06-07 patchlevel 36) [sparc-linux]

Compile time is just under 15 minutes on

cpu : TI UltraSparc II  
Cpu0Bogo : 592.40  
Cpu1Bogo : 592.03

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [June 13, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721/5 "2007-06-13T17:36:35Z")

</div>

Ben C. wrote:

> I also feel that the testing after the compile is through is a  
> little excessive. My old laptop compiled ruby in an hour or two  
> yesterday afternoon, but the test suite is still running this  
> morning.

I suspect your system isn’t configured correctly. I’ve re-compiled Ruby  
hundreds of times. There is a “miniruby” built during the install that  
runs scripts, but there should _not_ be any need to install a Ruby  
binary in order to build Ruby from source. If you’d like, email me off  
list or post your error messages here, and I’ll see if I can figure out  
what’s wrong.

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [June 13, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721/6 "2007-06-13T20:08:02Z")

</div>

On 6/13/07, Reid T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> that make installing Ruby extremely easy.
> 
> ```
> /usr/share/man/man1/testrb1.8.1.gz
> /usr/share/doc/ruby1.8/README.Debian
> /usr/share/doc/ruby1.8/copyright
> /usr/share/doc/ruby1.8/changelog.Debian.gz
> /usr/share/doc/ruby1.8/NEWS.gz
> 
> ```

Here is my tutorial for installing Ruby/Rails on Ubuntu. I hope this is  
helpful.

> **[Installing Ruby and Rails on Ubuntu](https://eyesontheprize.wordpress.com/2006/08/15/installing-ruby-and-rails-on-ubuntu/)**
>
> UPDATED: This has been updated, as of 5 November 2007. I run Ubuntu in a Parallels VM on my Macbook, as well as on a couple of machines for work. I subscribe to the “Ruby on Rails” mail…

Cheers,

Aaron K.

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [June 13, 2007, 7:33pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721/7 "2007-06-13T19:33:55Z")

</div>

On 6/13/07, Peter C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Usually all that’s required from a bare install is the usual “apt-get  
> build-essential” and then the ./configure, make, make install combo on  
> the Ruby source… generally works a treat 🙂

Same experience here. However it should be noted that although this  
should build ruby, some of the extensions in the standard library  
might fail if you don’t have their pre-requisite development packages  
loaded, things like readline, tk, zlib etc.

The trick here once you’ve got a partially built ruby on a debian  
system is to figure out what debian ruby packages the missing pieces  
are in, and then do an

apt-get build\_dep

on those packages, then make again, maybe after ./configure

When I was struggling with getting everything I needed for Ruby and  
Rails on Ubuntu, Andy H. suggested that I build from source, I took  
that advice and haven’t looked back.

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [June 13, 2007, 11:45pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721/8 "2007-06-13T23:45:44Z")

</div>

M. Edward (Ed) Borasky wrote:

> > architectures), and it would be a problem for them.
> 
> I suspect your system isn’t configured correctly. I’ve re-compiled Ruby  
> hundreds of times. There is a “miniruby” built during the install that  
> runs scripts, but there should _not_ be any need to install a Ruby  
> binary in order to build Ruby from source. If you’d like, email me off  
> list or post your error messages here, and I’ll see if I can figure out  
> what’s wrong.

Other people have posted that it works fine for them with ruby 1.8.  
However, nobody has posted to say that it works for them with ruby 1.9,  
which is what I was compiling. So my guess would be that it’s a bug  
that’s crept into the packaging of ruby 1.9. I no longer have the  
error message, and don’t need a solution myself, since I simply  
installed the 1.8 binary from the ubuntu repositories, and then  
resumed my compile. This should be trivial to reproduce, however.  
Just try to compile a recent nightly build on any machine that  
doesn’t already have ruby installed.

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [June 13, 2007, 8:49pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721/9 "2007-06-13T20:49:11Z")

</div>

I guess I was a bit terse in my original email. What I was hoping to  
point out is that for anyone new to Ruby / linux / Debian / UBUNTU, the  
notes on the download page re apt-get may leave them in a less than  
happy state when they attempt to ‘…get started in programming with  
Ruby…’. If they follow the apt-get instructions pointed out on the  
page, then start running through tutorials/book examples, etc, I think  
they’re pretty quickly going to start hitting errors due to missing  
components.

I think it would be beneficial if the apt-get install instructions on  
the download page were updated to include the broken out sub portions of  
Ruby, or if it was noted that they SHOULD read the ruby apt description  
to find out what other sub packages they should install.
