A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
In Ruby, everything is an object. Every bit of information and code can be given their own properties and actions. Object-oriented programming calls properties by the name instance variables and actions are known as methods. Rubyâ€™s pure object-oriented approach is most commonly demonstrated by a bit of code which applies an action to a number.
Ruby 1.9.2 is mostly compatible with 1.9.1, except the following changes:
- Many new methods
- New socket API (enhanced IPv6 support)
- New encodings
- Random class that supports various random number generators
- Time is reimplemented. There is no longer the year 2038 problem.
- some regexp enhancements
- $: no longer includes the current directory.
- dl is reimplemented on top of libffi.
- new psych library that wraps libyaml. You can use the library instead of syck.
Ruby 1.9 has four support levels.
- We verified that Ruby 1.9.2 works fine on it. And we can keep the 1.9.2 maintained on it.
- Debian GNU/Linux 5.0 on IA32.
- We verified that Ruby 1.9.2 works mostly fine on them. And I believe we can keep the 1.9.2 maintained on it.
- mswin32, x64-mswin64, mingw32
- MacOS X 10.5 (Intel) and 10.6
- FreeBSD 6 and later (amd64, IA32)
- Solaris 10
- Symbian OS
- I think Ruby 1.9.2 works fine on them with small modification, however, it is not verified. Patch is welcome.
- Other Linux distributions
- Other versions of MacOS X.
- AIX 5
- Other POSIX-compatible systems
- BeOS (Haiku)
- I do not think Ruby 1.9.2 works on them. Porting is welcome.
- Any other systems
Installing from the source code is a great solution for when you are comfortable enough with your platform and perhaps need specific settings for your environment. Itâ€™s also a good solution in the event that there are no other premade packages for your platform.
- Ruby 1.9.2-p0 (md5:Â 755aba44607c580fddc25e7c89260460) Stable Version (recommended)
- Stable Snapshot This is tarâ€™ed and gzipâ€™ed file of the latest stableÂ SVN. It should be better than the last stable release.
- Nightly Snapshot This is tarâ€™ed and gzipâ€™ed file of the latestSVN. It may contain unfixed problems.
The Windows platform has several options to install Ruby. The first option is to use theÂ RubyInstaller, an installer that contains compiled binaries. The second option is usage of packaged executables and binaries. If youâ€™re unsure about how to install Ruby, the first option might be the best for you.
- Ruby 1.8.6-p398 RubyInstaller(md5:Â 233d6b3ddc4c61436b075b51254cd138) Stable version (recommended)
- Ruby 1.8.7-p302 RubyInstaller(md5:Â 9391a3dddbbda3ee8aa3bb368fdc5279) Stable version (recommended)
- Ruby 1.9.1-p430 RubyInstaller(md5:Â 86ac589a955898c3163b161d81750a05) Stable version (recommended)
- Ruby 1.9.2-p0 RubyInstaller(md5:Â 21bf42f7ec4b8a831c947d656509cddb) Stable version (recommended)
- Ruby 1.8.7-p249 Binary(md5:Â 4fd37b0b4b21a042cae7f5f0a8daad16) Stable version
- Ruby 1.9.1-p378 Binary(md5:Â 7d14a918cc8d243d3e2c409aff41f454) Stable version
Depending on the distribution you are using, there are several ways to install Ruby. The first option is simply to download the source code above and compile by hand. However, on some platforms, there are package management solutions that make installing Ruby extremely easy.
For example, on Debian or UbuntuÂ
apt-getprovides an easy and elegant solution:
% sudo apt-get install ruby1.9.1-full
The above command installs the current stable version of Ruby 1.9.1. If you prefer to install a Ruby 1.8 version, you can use:
% sudo apt-get install ruby-full
For irb and rdoc you will need to enable the universe repository.