[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Getting Ruby

Reid Thompson

6/13/2007 2:17:00 PM

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

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

7 Answers

Ben Crowell

6/13/2007 3:03:00 PM

0

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.

Peter Cooper

6/13/2007 3:25:00 PM

0

On 6/13/07, Ben Crowell <crowell07@lightspamandismatterevil.com> 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 Cooper
http://www.rubyi...

not

6/13/2007 3:29:00 PM

0

On Wed, 13 Jun 2007 08:02:39 -0700, Ben Crowell 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

M. Edward (Ed) Borasky

6/13/2007 3:36:00 PM

0

Ben Crowell 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. 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.

Rick DeNatale

6/13/2007 5:33:00 PM

0

On 6/13/07, Peter Cooper <peter@peterc.org> wrote:
> On 6/13/07, Ben Crowell <crowell07@lightspamandismatterevil.com> 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 :)

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.

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...

Reid Thompson

6/13/2007 6:48:00 PM

0

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.

Ben Crowell

6/13/2007 9:41:00 PM

0

M. Edward (Ed) Borasky wrote:
> Ben Crowell 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. 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 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.