5 Tools for Ruby development
Nice article to Ruby Newbie
Ruby, the dynamic, interpreted programming language that adopts a pure object-oriented approach, has been gaining popularity among programmers. While many of Ruby's new converts are primarily developing Web applications, Ruby has a great history (much of it in Japan) as a separate language in its own right. Only recently are developers in the West beginning to understand the significant advantages Ruby has over other scripting languages such as Perl and Python, or even more established enterprise-level languages such as Java.
If you are one of those who recently boarded the Ruby bandwagon, you may not be sure which of the many available Ruby tools and libraries are most helpful to your development. This article looks at five essential tools and libraries that Ruby developers should have in their arsenal to be able to get the most out of the language.
1. RubyGems
In general, RubyGems provides a standard way to publish, distribute, and install Ruby libraries. It allows library developers to package their products so that installation becomes a one-line process. The resulting packages are simply called "gems." Likewise, RubyGems makes it easy for developers to get up and running with a whole swath of libraries quickly.
Like many packaging and installation systems for other languages (and even operating systems), RubyGems will detect dependencies and install them before installing the desired library, making it a no-brainer process to get a certain library running.
RubyGems currently isn't a standard part of the Ruby installation, but it likely will be in the future. For now, you have to download it separately, but the process is extremely simple. You need only open an archive and run a single Ruby file inside.
Beyond basic installation of most third-party Ruby libraries, RubyGems also makes managing the libraries installed on your computer simple. It provides a basic command line interface for uninstalling and upgrading libraries. You can even use this interface to install multiple versions of the same library on a single machine, enabling you then to address these separately (specifically by version, if necessary) by applications. This makes RubyGems even more powerful than, say, the popular CPAN system for Perl.
The primary reference and documentation site for RubyGems is rubygems.org.
2. A Good IDE or Text Editor
As with developing in other programming languages, Ruby developers rely on a myriad of different IDEs and text editors for development work. Because of the different platforms and preferences of each developer, it's impossible to recommend a single option, so this article quickly covers a few alternatives.
RADRails
RADRails was one of the first serious Ruby-specific IDEs. Despite the name, RADRails is not only for Rails applications. It, in fact, is generally useful for developing Ruby applications. Based upon the popular Eclipse IDE, RADRails is cross-platform (Windows, Linux, and OS X) and open source. Although other IDEs have now become popular, RADRails is still a good Ruby-specific choice.
jEdit
Like RADRails, jEdit is an open source, cross-platform IDE. Unlike RADRails, it isn't Ruby-specific at all. It is a general programmer's text editor. What earns jEdit a spot on this list is its "Ruby Editor Plugin," a plugin that adds a number of Ruby- (and Rails-) specific abilities to the editor, including syntax and error highlighting, integrated documentation, and auto-indentation.
Find more information about the Ruby Editor Plugin at rubyjedit.org.
Ruby In Steel
Ruby In Steel is a professional-grade Ruby IDE for Microsoft Visual Studio (MSVS) 2005. It features not only code completion, but also full Microsoft-style IntelliSense features on Ruby code. While it's not cheap ($199US), a free limited-feature edition and a free thirty-day trial make Ruby In Steel appealing to new Ruby developers who particularly appreciate the MSVS IDE.
TextMate
TextMate is an editor available only on Mac OS X. Its use by most of the core team of Rails developers has led to its strong adoption among OS X-based Ruby developers. Like jEdit, TextMate is a general programmer's text editor with a significant number of available Ruby-specific extensions. Depending on the current exchange rate, TextMate costs approximately $50US. TextMate's developer, Allan Odgaard, has been helping another developer produce a Windows clone called E (a.k.a. E-TextEditor).
3. Instant Rails
Most Ruby developers who have Ruby on Rails Web application framework installed went through the lengthy process of installing RubyGems, installing the Rails gems, and then setting up their environments. It doesn't need to be such a complex procedure, however. Two tools enable you to install a Rails application on a new computer quickly.
For Windows users, a single application called Instant Rails enables them to install and run an Apache Web server, Ruby, the MySQL database engine, and the Rails framework all at once.
Instant Rails gets a Rails application up and running with only a couple of clicks. This can be ideal if you need to deploy a Rails application to a client or on a remote machine where installing Ruby and Rails is not appropriate.
There are plans to port Instant Rails to Linux, BSD, and Mac OS X in the future, but currently Mac OS X users have an alternative called Locomotive. Like Instant Rails, Locomotive provides an all-in-one Rails deployment system within a single application.
4. Mongrel – A HTTP Server Library
Mongrel is an HTTP server tool and library for Ruby. On the surface, it doesn't sound particularly exciting, but its benefits are compelling. Ruby already comes with a HTTP server library known as WEBrick, but it's extremely slow. Mongrel's speed and reliability are head and shoulders above WEBrick and other alternatives, so installing it allows your Rails applications to run much faster. In fact, Mongrel is now used in the majority of Rails deployments, so it's a useful tool to learn. Additionally, you can use Mongrel directly from your Ruby code to develop your own HTTP server programs.
Installing Mongrel takes only a minute with RubyGems (using a mere gem install mongrel command). It has separate builds for Windows- and UNIX-related platforms due to the need to compile some external C code.
Of the five tools this article covers, Mongrel is the only library. As such, it serves as a great example of how to package, market, and document a library. Mongrel's popularity rests not just on its performance, but also on the way creator Zed Shaw has engaged the community and thoroughly documented the library. If you view Mongrel's source code, you'll find almost as many comments as lines of code.
5. An RSS Feed Reader for Community Interaction
One of the interesting things about Ruby is its community. As a language that gained widespread popularity in the West in only the past few years, Ruby developers have taken advantage of new technologies like blogs to build the community and share their knowledge.
Most of the best Ruby developers have blogs and reading them can extend the knowledge of a novice Ruby developer substantially. Indeed, the strong, evangelical blogging community is one of the main reasons Rails has taken off in the past couple of years. So having a quick and easy way to keep up with several Ruby blogs is key. As nearly all blogs publish an RSS feed, an RSS application or access to an online RSS reader provides a lot of value for any Ruby developer.
The most popular online RSS reader is Google Reader, but client-side readers exist for all platforms. On Windows, a good, free RSS reader is SharpReader. On Mac OS X, NewsFire is a good one. A good place to find Ruby blogs worth reading regularly is Ruby Inside. Visit the site and subscribe to the blogs in the "Choice Blogs" sidebar.
Keeping up to date with Ruby blogs means you'll not only come across the best tutorials and Ruby posts as they're written, but you'll also begin to connect with the community and get a feel for how to extract value from it.
|