Ruby installation instruction for Mac and Linux

Hello,

I’m writing a tutorial, aimed at the non-programmer. I’m assuming very
little previous computing experience. (My hope is that this tutorial could
be used by
children.) It’s not finished yet (four more chapters to go, I think), but
you’re welcome to peek at what I have so far. Comments and suggestions are
certainly welcome (as are good exercises). But that’s not why I’m
writing…

In the first section, Getting Started, I describe a Windows installation of
Ruby in detail: where to get it, what to do, what a text editor is, and how
to use the command line.

Not having much Linux experience at all, and never having had a Mac, are
there instructions similar to these out there that someone could point me
to? I imagine that Linux instructions won’t have to be so detailed, but Mac
instructions really should be on par with what I wrote for the Windows
installation. Any help on this part would be greatly appreciated.

http://hellotree.gotdns.com/LearnToProgram/

Many thanks,

Chris

Ruby 1.6.7 is a part of Mac OS X 10.2 (Jaguar). This is not built with
all libraries, but does support everything used in your tutorial.

Ruby is accessible from the Terminal application (found in
Applications/Utilities) in all versions of Mac OS X.

The text editors available on Mac OS X include emacs, pico and vi (the
write up can be the same as for the linux variants run from a
Terminal). Mac OS X also has TextEdit, but care must be taken to save
files as text-only and not the native format of rtf.

There is no working up-to-date version of Ruby for Mac OS 9 or earlier.

For Mac OS X 10.1, Marc Liyange has a binary package of Ruby 1.6.7 that
can be found here: http://www.entropy.ch/software/macosx/#ruby. Also,
fink has Ruby at fink.sourceforge.net (1.6.7 is in the unstable tree
the last time I looked).

···

On Sunday, December 15, 2002, at 09:20 PM, Chris Pine wrote:

[snip]

Not having much Linux experience at all, and never having had a Mac,
are
there instructions similar to these out there that someone could point
me
to? I imagine that Linux instructions won’t have to be so detailed,
but Mac
instructions really should be on par with what I wrote for the Windows
installation. Any help on this part would be greatly appreciated.

[snip]

Hi, Chris,

Not having much Linux experience at all, and never having had a Mac, are
there instructions similar to these out there that someone could point me
to? I imagine that Linux instructions won’t have to be so detailed,

For Linux, I think that it would be better to show how a non-root user
could install Ruby because most of the users who you aim to are not
super users. It is very simple to install Ruby as a normal user.

  1. Get a source archive of the latest stable version from http://www.ruby-lang.org/en/download.html

  2. Unzip and Untar the downloaded source into such like $HOME/tmp.
    $ tar zxvf ruby-1.6.7.tar.gz

  3. Change directory to extracted sources, e.g. $HOME/tmp/ruby-1.6.7 .

  4. Run configure script with --prefix option. Using --prefix=$HOME will
    install Ruby under your home directory.
    $ ./configure --prefix=$HOME

  5. Add $HOME/bin to your command search path by editing your ~/.bashrc
    or something alike.

  6. Confirm the installation. Type ‘ruby -v’. If the installation
    succeeded, ruby version will be shown.

That’s all for Linux or UNIX machines.

···


Makoto Satoh


Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/