Introduction: This article describes how to use the Eclipse plug-in Ruby Development Tools (RDT), a plug-in that enables eclipse to become a first-class Ruby development environment. Ruby developers who want to leverage the rich infrastructure of the Eclipse community to support development will benefit from this article, as will the Java developers interested in using Ruby.
Why do you use Ruby?
Why do Java developers care about Ruby? Ruby is a general-purpose scripting language developed in Japan 10 years ago. Contrary to popular belief, it is a purely object-oriented language. Unlike Java technology, Ruby has no scalar, so everything (including integers) is a class of objects. Ruby's syntax is largely borrowed from Smalltalk, Python, and Ada. As with the Java language, Ruby is also a single inheritance language, but it provides some of the advanced features that Java technology lacks, such as closures (similar to anonymous inner classes on steroids) and mix-ins (similar to interfaces, but not too tightly bound to classes). Ruby is also highly portable and can be run on all major operating systems.
Ruby is now very popular and people are starting to use it to build applications. Because it is interpreted and uses dynamic types, you can do a lot of extremely flexible work at run time, which is very difficult in Java. One of the magical features supported by dynamic typing and expression syntax is the ability to create domain-specific languages in Ruby, which enables developers to work at higher levels of abstraction, leaving the "raw" syntax of the language. Ruby on Rails is a framework for creating WEB applications with back-end databases that demonstrate this elegance. Rake (the combination of make and Ant versions of Ruby) also shows the power of Ruby.
Another reason to use Ruby is that many astute developers are already starting to use it. Developers who realized that Java technology was about to pop in 1996 (such as Glenn Vanderburg, Bruce Tate, and Martin Fowler) are now starting to use Ruby. Even if you're not ready to turn to Ruby all at once, you should also look at the language now.
One of the major constraints for extensive development with Ruby is the lack of an excellent development environment (especially for those who do not want to learn Emacs). RDT changed the situation. Use Ruby in your favorite Eclipse IDE, which makes you feel comfortable.
Get ready
Before you can start using Ruby, you must install (or verify that you already have) Ruby interpreter and library and Ruby Development environment.
Get Ruby
You can get a version of Ruby that fits all the mainstream platforms and several secondary platforms. In fact, your linux® or Cygwin distribution may already contain Ruby. Go to the command prompt and enter ruby-v.
If you see a version number, it means Ruby already has it. If you don't see the version number, you need to get Ruby. Find the distribution that is right for your platform first.
If you're using Windows®, it's easier. RubyForge (similar to the SourceForge feature) has a project called the One-click Ruby Installer, which creates a ruby environment on Windows (see Resources). It also includes several tools, including the IDE called Freeride, but if you use RDT, you can ignore most of these tools.