Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Ruby / Yukihiro Matsumoto_Programming Ruby.doc
Скачиваний:
121
Добавлен:
06.06.2015
Размер:
2.71 Mб
Скачать

Why Did We Write This Book?

So we'd just finished writing The Pragmatic Programmer,our families had just started talking to us again, and suddenly we felt the need to write another book. Why? We guess it comes down to a kind of missionary zeal.

Ruby was created by Yukihiro Matsumoto (Matz) in Japan. Since 1995, its popularity in Japan has grown at an astounding rate; there are rumors that Ruby is more popular than Python in Japan. But to date, much of the detailed Ruby documentation is in Japanese. It probably isn't a programming language you'd just stumble across.

We wanted to spread the word, to have more people outside Japan using Ruby and enjoying the benefits, so we decided to document Ruby in English. And what started out as a small project just sort of grew....

Ruby Versions

This book documents Version 1.6 of Ruby, which was released in September 2000.

Ruby version numbering follows the same scheme used for many other open source projects. Releases with even subversion numbers (1.0, 1.2, 1.4, and so on) are stable, public releases. These are the releases that are prepackaged and made available on the various Ruby Web sites.

Development versions of the software have odd subversion numbers, such as 1.1 and 1.3. These you'll have to download and build for yourself, as described in the box on page xxvii.

Installing Ruby

You can get Ruby from ftp://ftp.netlab.co.jp/pub/lang/ruby, or from the mirror sites listed on page 526 in Appendix C. There you will find the latest stable release, as well as various development releases.

You'll always find source code releases of Ruby; you may also find prebuilt binaries for Windows or other operating systems (like the binary distribution of Ruby for Windows at http://www.pragmaticprogrammer.com/ruby/downloads/ruby-install.html).

Sidebar: The Very Latest Ruby

For those who just have to be on the very latest, hot-off-the-press and untestedcutting edge (as we were while writing this book), you can get development versions straight from the developers' working repository.

The Ruby developers use CVS (Concurrent Version System, freely available from http://www.cvshome.com) as their revision control system. You can check files out as an anonymous user from their archive by executing the following CVS commands:

% cvs -d :pserver:anonymous@cvs.netlab.co.jp:/home/cvs   login(Logging in to anonymous@cvs.netlab.co.jp)CVS password: guest% cvs -d :pserver:anonymous@cvs.netlab.co.jp:/home/cvs   checkout ruby

The complete source code tree, just as the developers last left it, will now be copied to a ``ruby'' subdirectory on your machine, updating your local source tree from a repository on the other side of the world. Isn't it a great time to be alive?

Building Ruby

In the Ruby distribution you'll find a file named README, which explains the installation procedure in detail. To summarize, you build Ruby on POSIX-based systems using the same four commands you use for most other open source applications:./configure,make,make test, andmake install. You can build Ruby under other environments (including Windows) by using a POSIX emulation environment such ascygwin[See http://sourceware.cygnus.com/cygwin for details.]or by using native compilers---see ``ntsetup.bat'' in the distribution'swin32subdirectory as a starting point.

Соседние файлы в папке Ruby