Getting Ruby

R

Reid Thompson

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
 
P

Peter Cooper

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 Cooper
http://www.rubyinside.com/
 
N

not

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
 
M

M. Edward (Ed) Borasky

Ben said:
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.

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.
 
R

Rick DeNatale

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

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 Hunt suggested that I build from source, I took
that advice and haven't looked back.
 
R

Reid Thompson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top