Getting Ruby


#1

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

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


#2

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.


#3

On 6/13/07, Ben C. 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 :slight_smile:

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 :wink:

Cheers,
Peter C.
http://www.rubyinside.com/


#4

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


#5

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.


#6

On 6/13/07, Reid T. 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.

http://eyesontheprize.wordpress.com/2006/08/15/installing-ruby-and-rails-on-ubuntu/

Cheers,

Aaron K.


#7

On 6/13/07, Peter C. 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 :slight_smile:

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/


#8

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.


#9

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.