Package overview
RubyWorks implements a load-balanced cluster of Mongrel servers, which in most situations is the best way to deploy a Rails application today. It is packaged as a Yum repository (for RedHat/CentOS) or APT repository (for Debian/Ubuntu), containing these binary packages:
- ruby – the Ruby interpeter
- rubygems – package manager for Ruby libraries
- rubygem-mongrel – fast HTTP library and server for Ruby
- rubygem-rake – Ruby Make
- haproxy – general purpose HTTP proxy that acts as a software load balancer in RubyWorks stack
- monit – lightweight monitoring tool which is responsible for making sure that other daemon processes are up, running and not leaking memory
- runit – process controller that starts, stops and supervises all other daemons in the stack
- rubyworks – an umbrella package that installs and configures all other pieces so that they work together
The same repository includes some optional packages that are not automatically installed with the ‘rubyworks’ package:
- ruby-devel (ruby1.8-dev in Debian/Ubuntu repository) – header files for Ruby
- rubygem-mysql (libmysql-ruby in Debian/Ubuntu repository) – MySQL database client library with Ruby bindings
- rubygem-postres (libpgsql-ruby in Debian/Ubuntu repository) – PostgreSQL database client library with Ruby bindings
- ruby-oci8 – Oracle database client library with Ruby bindings
- rubygem-hpricot (libhpricot-ruby in Debian/Ubuntu repository) – very flexible HTML parser
- rubygem-libxml-ruby (libxml-ruby in Debian/Ubuntu repository) – Ruby language bindings for the GNOME Libxml2 XML toolkit
- rubygem-rmagick (librmagick-ruby in Debian/Ubuntu repository.) – interface between the Ruby programming language and the ImageMagick® and GraphicsMagick image processing libraries.
In some cases, the same packages are already available in the official package repositories of a particular Linux distribution. In these cases, RubyWorks uses the official distribution package, unless it is of a wrong version or has some other known problems.
Mongrel (and its dependencies) are also packaged as Ruby gems. These are in RubyWorks’ own gem repository, along with some popular gems: rake, hpricot and libxml-ruby. Any gem with native code in RubyWorks gem repository is pre-compiled. This way, you don’t need to install C compiler and other build tools on your production servers.
Why ‘gem sources’ points to http://rubyworks.rubyforge.org/, not http://gems.rubyforge.org/ ?
Because the main gems repository (http://gems.rubyforge.org) is not safe enough. In theory, anyone who owns a RubyForge project could upload a “mongrel-2.0.gem”, so that “gem install mongrel” will by default install that gem instead of the real Mongrel. Although it’s not likely to happen, it could be a great headache, if it ever does.
To protect users’ production servers, RubyWorks production stack changes the default gem repository to RubyWorks’ own. If you DO want to install gems from the “official” repository, you can specify the “—source” option explicitly:
gem install bluecloth --source http://gems.rubyforge.org/
However our recommendation is: always freeze ALL the gems you need (except Mongrel and database drivers) into your Rails application.
