Forum: Ruby Getting Ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
91e1fb8bd265b7629491ab64c42f0906?d=identicon&s=25 Reid Thompson (Guest)
on 2007-06-13 16:17
(Received via mailing list)
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
87a93e39170634dbb08b103fb328ed86?d=identicon&s=25 Ben Crowell (Guest)
on 2007-06-13 17:06
(Received via mailing list)
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.
509e15b158eaac5ab3a5332a3f89d4a7?d=identicon&s=25 Peter Cooper (Guest)
on 2007-06-13 17:25
(Received via mailing list)
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.rubyinside.com/
C2dd763f24337e09818ea844783d143f?d=identicon&s=25 not (Guest)
on 2007-06-13 17:31
(Received via mailing list)
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
3bb23e7770680ea44a2d79e6d10daaed?d=identicon&s=25 M. Edward (Ed) Borasky (Guest)
on 2007-06-13 17:36
(Received via mailing list)
Ben Crowell 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.
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2007-06-13 19:33
(Received via mailing list)
On 6/13/07, Peter Cooper <peter@peterc.org> 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 Hunt 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/
571b69519dc3cb4a78aa80f4e645349f?d=identicon&s=25 Aaron Kulbe (Guest)
on 2007-06-13 20:08
(Received via mailing list)
On 6/13/07, Reid Thompson <Reid.Thompson@ateb.com> 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/ins...

Cheers,

Aaron Kulbe
91e1fb8bd265b7629491ab64c42f0906?d=identicon&s=25 Reid Thompson (Guest)
on 2007-06-13 20:49
(Received via mailing list)
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.
87a93e39170634dbb08b103fb328ed86?d=identicon&s=25 Ben Crowell (Guest)
on 2007-06-13 23:45
(Received via mailing list)
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.
This topic is locked and can not be replied to.