From the Padrino’s site:
Padrino is a ruby framework built upon the excellent Sinatra Microframework. Sinatra is a DSL for creating simple web applications in Ruby with speed and minimal effort. This framework makes it as fun and easy as possible to code increasingly advanced web applications by expanding upon Sinatra while maintaining the spirit that made it great.
The Ruby community has plenty of web frameworks at this point. Padrino — self-described as “The Elegant Ruby Web Framework” — is interesting because it’s built on top of Sinatra, it’s highly modular, quite fast, and provides a drop-in admin interface. It fits between Sinatra and a large framework like Rails.
If it wasn’t for the fact that Rails 3 is about to be released, Padrino may have had a fighting chance at acquiring a good market share within the Ruby community. Rails 3 is here though, and it too is very modular and fast. Plus, it’s hard to beat the huge ecosystem that’s already built around it.
That said, the presence of an admin interface, a la Django, and the Sinatra core are definitely inviting features. Check out their documentation and screencast, to see if you think it’s worth considering for your own web development needs.
Rails 3 is a major upgrade; using it almost feels like working with an entirely new framework. Porting existing applications and acquiring the skills required to build new ones entails a significant amount of effort. You could scout the net for bits and pieces of information, but that would be time consuming and possibly frustrating. Thankfully there are resources available that have done the work for you, so you don’t have to waste time trying to figure out what’s new.
In this post, I’d like to point out a couple of resources that I think compliment each other well, and focus on how to upgrade applications, as opposed to simply providing you with a shopping list of features.
The first one is Upgrading applications to Rails 3, a screencast that was just released by ThinkCode.TV. This screencast is almost an hour-long and shows you how to port a real world web application from Rails 2 to Rails 3. As such, it can be very useful if you have existing code that you’d like to port over to Rails 3. The author ported a few large applications to Rails 3, as he has solid experience with it. I’m biased of course, but I feel it’s well worth $8.99. (Today only, use the coupon RAILS3 to purchase this Rails screencast for just $5.99.)

The second resource is the Rails 3 Upgrade Handbook by Jeremy McAnally. It’s a beautiful PDF that succinctly explains what’s new in Rails 3, as well as how to upgrade your applications to the new edition of the framework. At 10c per page ($12 for 120 pages), it too is worth the money in my opinion.

Regardless of whether you end up buying these resources or not, I sure hope you have extensive test coverage for your existing Rails 2 applications. In my experience this is a must, because porting complex applications to Rails 3 without solid test support is a definite challenge. Nevertheless, I feel that this major upgrade is truly worth it. Rails 3 really brings Rails to a whole new level and we, as a community, should be proud and excited about what lies ahead of us.
This is a tiny post to let you know that IBM just released version 2.5.0 of the IBM_DB gem with support for the upcoming Rails 3. That’s what I call both proactive and a true testament of IBM’s commitment towards DB2 on Rails.
Aside from providing a working adapter and driver before the new framework release is even out, this release has a few improvements and fixes, such as getting rid of a minor bug related to prepared statements and has_many associations.
Finally, ibm_db 2.5 improves upon Unicode integration with support for any encoding format that’s permitted by Ruby 1.9.

Recently Matt Aimonetti wrote an insightful article about Rails and the Enterprise. In it he identifies five core Enterprise application needs:
Matt then proceeds to illustrate how Rails does a good job in regards to most of these points, despite a few existing challenges.
Among these challenges, I can clearly see the following:
There isn’t a 1-800-RAILS number; the community may be great, but there are not exactly yearly contracts in place. Furthermore, the author of the Ruby driver for, say, Oracle doesn’t owe you a thing. He may or may not be there for you when you need something to be fixed quickly.
XML support is less than ideal (but it is improving).
Integration with the Enterprise world is not easy, due in part to less than stellar SOAP support (but that is also improving).
If you’re taking advantage of ActiveRecord and an Enterprise database like Oracle, your DBA isn’t likely to be happy that you aren’t using prepared statements.
You may think these are small points, and in the startup world they generally are. However, in the Enterprise world they do make the difference between adoption and niche.
One thing that Matt forgot to mention is DB2, which should be the poster child for how Rails can be Enterprise ready. And as a bonus, you get to throw around IBM’s name (which is synonymous with Enterprise) because Rails is both supported by, and used within, IBM.
Let’s address each point above with DB2 on Rails in mind.
IBM is the only database vendor to provide a Ruby driver and ActiveRecord/Rails adapter for its databases. This means that you have a team that’s accountable when things don’t work as they’re supposed to. This team is accountable, regardless of whether you have a contract with IBM or not; it’s their job, not a hobby. This involvement with Rails dates back to 2006, with continuing releases and improvements ever since. Our IBM’s optional yearly 24/7 support contracts (e.g., for less than $3000 a year per server with DB2 Express-C) include support for DB2 on Rails as well.
DB2 supports native storage and querying of XML documents and data (plus it’s fast). This technology is known as pureXML.
DB2 can both consume and serve SOAP web services. This lets DB2 do the integration for you.
DB2 on Rails supports parameterized queries. (While on the subject of queries, if you are using JRuby you can take advantage of pureQuery, which is an IBM created Enterprise solution that’s aimed at making your queries fast, reliable, manageable and easy to debug.)
If you are trying to introduce Rails into your Enterprise job, chances are that DB2 will already be present within the company infrastructure. If not, you can use DB2 Express-C which is entirely free — thus making it easier to introduce than an expensive solution.
IBM is one of the most trusted brands on the market today, as it has been for decades now. Banks and Enterprise companies the world over trust DB2 with their most critical data. One way for the Rails community to increase the adoption of Rails in the Enterprise, is to acknowledge and embrace the great pair that is Rails and DB2.
The API development team just released a major version of the ibm_db gem. Detailed installation instructions are available on RubyForge (PDF). Among several improvements, there are three particularly newsworthy features:
As we approach the release of Rails 3, supporting Ruby 1.9 is becoming more of a necessity. Likewise, the so called “One-Click installer” on Windows has been replaced by a current project that uses mingw32, which offers a much needed performance boost on Windows. Having a mingw32 compatible gem is starting to become a requirement for many of our Windows users.
Finally, DB2 is now the only database that supports prepared statements in ActiveRecord (without changing any of the application’s code). This has important performance benefits, as I explained in my article Improve the security and performance of DB2 Ruby on Rails applications using parameterized queries, which was published today by developerWorks.
The following is a very short guide on setting up Ruby Enterprise Edition (REE), nginx and Passenger, for serving Ruby on Rails applications on Ubuntu. It also includes a few quick and easy optimization tips.
We start with setting up REE (x64), using the .deb file provided by Phusion:
wget http://rubyforge.org/frs/download.php/66163/ruby-enterprise_1.8.7-2009.10_amd64.deb
sudo dpkg -i ruby-enterprise_1.8.7-2009.10_amd64.deb
ruby -v
In output you should see “ruby 1.8.7 (2009-06-12 patchlevel 174)…” or similar. If this is the case, good; while you are there, update RubyGems and the installed gems:
sudo gem update --system
sudo gem update
Next, you’ll need to install nginx, which is a really fast web server. The Phusion team has made it very easy to install, but if you simply follow most instructions found elsewhere, you’ll get the following error:
checking for system md library ... not found checking for system md5 library ... not found checking for OpenSSL md5 crypto library ... not found ./configure: error: the HTTP cache module requires md5 functions from OpenSSL library. You can either disable the module by using --without-http-cache option, or install the OpenSSL library in the system, or build the OpenSSL library statically from the source with nginx by using --with-http_ssl_module --with-openssl=options.
Instead, we are going to install libssl-dev first and then nginx and its Passenger module:
sudo aptitude install libssl-dev
sudo passenger-install-nginx-module
Follow the prompt and accept all the defaults (when prompted to chose between 1 and 2, pick 1).
Before I proceed with the configuration, I like to create an init script and have it boot at startup (the script itself is adapted from one provided by the excellent articles at slicehost.com):
sudo vim /etc/init.d/nginx
The content of which needs to be:
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
### END INIT INFO
PATH=/opt/nginx/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/nginx/sbin/nginx
NAME=nginx
DESC=nginx
test -x $DAEMON || exit 0
# Include nginx defaults if available
if [ -f /etc/default/nginx ] ; then
. /etc/default/nginx
fi
set -e
. /lib/lsb/init-functions
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /opt/nginx/logs/$NAME.pid \
--exec $DAEMON -- $DAEMON_OPTS || true
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /opt/nginx/logs/$NAME.pid \
--exec $DAEMON || true
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --pidfile \
/opt/nginx/logs/$NAME.pid --exec $DAEMON || true
sleep 1
start-stop-daemon --start --quiet --pidfile \
/opt/nginx/logs/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS || true
echo "$NAME."
;;
reload)
echo -n "Reloading $DESC configuration: "
start-stop-daemon --stop --signal HUP --quiet --pidfile /opt/nginx/logs/$NAME.pid \
--exec $DAEMON || true
echo "$NAME."
;;
status)
status_of_proc -p /opt/nginx/logs/$NAME.pid "$DAEMON" nginx && exit 0 || exit $?
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|reload|force-reload|status}" >&2
exit 1
;;
esac
exit 0
Change its permission and have it startup at boot:
sudo chmod +x /etc/init.d/nginx
sudo /usr/sbin/update-rc.d -f nginx defaults
From now on, you’ll be able to start, stop and restart nginx with it. Start the server as follows:
sudo /etc/init.d/nginx start
Heading over to your server IP with your browser, you should see “Welcome to nginx!”. If you do, great, we can move on with the configuration of nginx for your Rails app.
Edit nginx’ configuration file:
sudo vim /opt/nginx/conf/nginx.conf
Adding a server section within the http section, as follows:
server {
listen 80;
server_name example.com;
root /somewhere/my_rails_app/public;
passenger_enabled on;
rails_spawn_method smart;
}
The server name can also be a subdomain if you wish (e.g., blog.example.com). It’s important that you point the root to your Rails’ app public directory.
The rails_spawn_method directive is very efficient, allowing Passenger to consume less memory per process and speed up the spawning process, whenever your Rails application is not affected by its limitations (for a discussion about this you can read the proper section in the official guide).
If you have lots of RAM (e.g., more than 512 MB) on your server, you may want to consider increasing you maximum pool size, with the directive passenger_max_pool_size from its default size of 6. Conversely, if you want to limit the number of processes running at any time and consume less memory on a small VPS (e.g., 128 to 256MB), you can decrease that number down to 2 (or something in that range). (Always test a bunch of configurations to find one that works for you). You can read more about this directive, in the official guide.
While you are modifying nginx’ configuration, you may also want to increase the worker processes (e.g., to 4, on a typical VPS) and add a few more tweaks (such as enabling gzip compression):
# ...
http {
passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5;
passenger_ruby /usr/local/bin/ruby;
include mime.types;
default_type application/octet-stream;
access_log logs/access.log;
sendfile on;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
gzip_comp_level 2;
gzip_proxied any;
server {
#...
When you are happy with the changes, save the file, and restart nginx:
sudo /etc/init.d/nginx restart
If you wish to restart Passenger in the future, without having to restart the whole web server, you can simply run the following command:
touch /somewhere/my_rails_app/tmp/restart.txt
Passenger also provides a few handy monitoring tools. Check them out:
sudo passenger-status
sudo passenger-memory-stats
That’s it, you are ready to go! I hope that you find these few notes useful.
Now that Mac OS X 10.6 is out, it’s time to leave the world of 32 bit computing behind. The pre-installed Ruby interpreter will run in 64 bit mode by default, so you may need to pay attention when installing some C-based gems. The ibm_db Ruby gem for DB2 can easily be installed or updated to the latest available version by following these simple steps:
$ sudo -s
$ export IBM_DB_LIB=/Users/<username>/sqllib/lib64
$ export IBM_DB_INCLUDE=/Users/<username>/sqllib/include
$ export ARCHFLAGS="-arch x86_64"
$ gem install ibm_db
You can verify that the installation was successful my running the following:
$ irb
>> require 'ibm_db.bundle'
=> true
Please let me know if you encounter any issues, I’d be glad to help you.
I finally got around to updating the Ruby and Rails book pages. The existing list was getting a bit obsolete and I didn’t like the idea of recommending old books to newcomers. I also had some interesting new entries.
Without further ado:
A few people may disagree with the choices, but I think most experienced Ruby and Rails programmers, who’ve read those books, will concur with my recommendations. I’m quite confident that these are, all things considered, some of the best books available on the subject.
A word to the publishers
As tempting as it is to collect Ruby and Rails books, these days I don’t feel I can economically justify the act of purchasing every Ruby or Rails book put out there. So if you are a publisher or an author, and you’d like for me to consider your book, you are certainly welcome to send me a review copy. I will definitely read it, but only include it on these lists if it’s either outstanding or as good as the existing ones. If it’s a programming book that’s not related to Ruby/Rails, yet is really good, I would consider reviewing it on my blog.
In a recent blog entry, Charles Nutter argues about the importance of JRuby for Ruby’s adoption within the Enterprise. Or, in his own words:
The idea of “Enterprise Ruby” has become less repellant since Dave Thomas’s infamous keynote at RailsConf 2006. There are a lot of large, lumbering organizations out there that have yet to adopt any of the newer agile language/framework combinations, and Rails has most definitely led the way. I personally believe that in order for Ruby to become more than just a nice language with a great community, it needs to gain adoption in those organizations, and it needs to do it damn quickly. JRuby is by far the best way for that to happen.
He has a very good point. Working for IBM (it doesn’t get much more Enterprise than that) I can testify to the number of colleagues and partners who ask me questions like, “Can I interface Rails with Java?”, “Can I deploy it with WebSphere?” or “How can I generate a Rails WAR file?”. The answers to these and similar questions are all found in JRuby.
A couple of years ago I “toured” Canada, speaking at a few IBM, internal conferences. The vast majority of my attendees were experienced Java developers who were doing business consulting for IBM’s clients. They were all very enthusiastic about my presentation on Ruby and Rails. It was a break from J2EE’s complexity. These people were genuinely excited about the perspective of using Rails when doing client work.
Mid-conference, one attendant said to me, “This is cool, but they’ll never let us use this stuff”. And that’s when I reached for the JRuby slides. The mood in the room suddenly shifted. These developers started to think “OK, this could actually work”. At the end of my speech, most of the questions I received had to do with JRuby.
As I mentioned during that series of conferences “JRuby can be your gateway to introducing Rails into your workplace”. Many people within the Enterprise world don’t have an option. It’s either a JVM-based solution or they have to give up on Rails altogether.
JRuby is not only attractive to Ruby fans who’d like to use Ruby/Rails in certain work environments, it’s also appealing to those who are looking for an alternative to Java as a language. Here is where we could hit the jackpot in terms of Ruby’s adoption. There are countless Java programmers in the world. Convincing even just a fraction of them to switch would be enough to drastically increase the size of our community.
As Charles mentioned in his post, people can now pick between Scala, Clojure, Groovy, JRuby and Jython. I believe that the choice developers ultimately make boils down to three key usability aspects:
Charles’ team has been focusing on the right things. If I can be permitted one criticism though, it would be to avoid responding to every post that praises a competing implementation. Openly fighting against other implementations can backfire and looks unprofessional. I understand the desire to set the record straight and being competitive, but there is no reason to constantly point out that “these implementations are not done” every time an early project shows some form of promise or progress. Otherwise, it’s easy to come across as someone whose “heart turned black as coal, and who finds himself wishing bad luck towards other implementations”.
Today JRuby is an Enterprise-friendly alternative to Ruby MRI/KRI; and Charles is right, JRuby is important for Ruby’s future. It would however be wrong to assume that JRuby is the only sort of future for Ruby and that C/C++ based implementations are becoming irrelevant. Ruby has never been a zero-sum game. Plurality is a substantial part of what the Ruby ecosystem is all about.
Finally, let me conclude by congratulating the JRuby team, who have just been hired by Engine Yard. I think this could be a very strategic move for both JRuby and Engine Yard.
This is a great day for those of us who love DB2, as DB2 Express-C 9.7 has just been released. As mentioned before, this is the best DB2 ever, and an extremely important release.
To learn more about what’s new in this release, please check out the recording of our latest webinar:
If you run Linux, Unix or Windows, download it while it’s hot.
DB2 9.7 on the Cloud
Another great aspect of this release is that for the first time ever, DB2 has been released both as a product and as a deployment on the Cloud. If you pop over to RightScale, you can get a trial account for free and should see DB2 Express-C 9.7 on both CentOS and Ubuntu within the partner catalog. RightScale has been an amazing partner and they really do wonders to simplify Cloud Computing. In ten minutes time you can be up and running on the Cloud, thanks to the templates provided.
DB2 support for Django
But the good times don’t stop there, we are also announcing the first official release of the Django adapter for DB2. It sounded crazy when I first proposed the idea within IBM back in 2006, but now it’s a reality.
You can download the .tar.gz archive from the Google Code homepage for the project, or simply by clicking here. This version fully supports the Django 1.0.2 API. For instructions on how to install it, please read the Getting started with the IBM DB Django adapter guide. The current version supports DB2 for Linux, Unix, Windows and MAC OS X, version 8.2 or higher (9.5 FP2 or higher for MAC OS X). In the future, IBM Cloudscape, Apache Derby, Informix (IDS) and both System i & z/OS will be supported.
ibm_db gem updated to 1.1
I’ll conclude this DB2-centric post with a smaller, but still interesting announcement. The ibm_db gem has been updated to version 1.1. This release includes support for ActiveRecord’s QueryCache mechanism, enhanced support for BigInt (and BigSerial), support for rename_column (requires DB2 9.7), parametrization of the timestamp datatype (requires DB2 9.7), and a few fixes and performance enhancements as well. It is recommended that you upgrade to this version.
Counting rows is an ubiquitous operation on the web, so much so that it’s often overused. Regardless of misuse, there is no denying that the performance of counting operations has an impact on most applications. In this post I’ll discuss my findings about the performance of DB2 9.5 and MySQL 5.1 regarding counting records.
For those of you who are not into science fiction, let me clarify that the odd title of this post is a tongue-in-cheek reference to the great novel, Do Androids Dream of Electric Sheep?.
I connected to the database, created the table, imported the data and benchmarked counting operations using ActiveRecord in a standalone script. Here is the code I used:
#!/usr/bin/env ruby
require "rubygems"
require "active_record"
require 'benchmark'
ActiveRecord::Base.establish_connection(
:adapter => :mysql,
:username => "myuser",
:password => "mypass",
:database => "mydb")
ActiveRecord::Schema.define do
create_table :people, :force => true do |t|
t.string :name, :null => false
t.string :fbid, :null => false
t.string :gender
t.string :profession
end
end
class Person < ActiveRecord::Base
end
# This can be sped up by performing an import instead
Person.transaction do
File.open("person.tsv").each_line do |line|
line = line.split(/\t/)
p = Person.new
p.name = line[0]
p.fbid = line[1]
p.gender = line[6]
p.profession = line[17]
p.save!
end
end
n = 100
Benchmark.bm(26) do |x|
x.report("Count all:") { n.times { Person.count } }
x.report("Count profession:") { n.times { Person.count(:profession) } }
x.report("Count females:") do
n.times { Person.count(:conditions => "gender = 'Female'") }
end
x.report("Count males w/ profession:") do
n.times { Person.count(:profession, :conditions => "gender = 'Male'") }
end
end
Please note that importing records in a huge transaction containing hundreds of thousands of INSERT operations is far from the most efficient way to import. Massive imports of data using the load/import facilities provided by each database is the way to go (also see the ar-extensions plugin). The lengthy import wasn’t benchmarked here though, so it isn’t determinant for this article.
people.tsv is a 92.7 MB tab separated values file that contains 875,857 records from the Freebase project (in my file I removed the header line, leaving only records).
For those who are not familiar with ActiveRecord, the queries executed behind the scenes are (in order):
SELECT count(*) AS count_all FROM people
SELECT count(people.profession) AS count_profession FROM people
SELECT count(*) AS count_all FROM people WHERE (gender = 'Female')
SELECT count(people.profession) AS count_profession FROM people WHERE (gender = 'Male')
While the table definition (for MySQL) is:
CREATE TABLE `people` (
`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY,
`name` varchar(255) NOT NULL,
`fbid` varchar(255) NOT NULL,
`gender` varchar(255),
`profession` varchar(255)
) ENGINE=InnoDB
As easily verified by enabling logging with:
ActiveRecord::Base.logger = Logger.new(STDOUT)
Without much further ado, here are the times I obtained on my last generation MacBook Pro 2.66 GHz with 4 GB DDR3 RAM, and 320 GB @ 7200 rpm hard disk, running Mac OS X Leopard:
MySQL:
Count all: 42.467522
Count profession: 52.130935
Count females: 54.575469
Count males w/ profession: 64.046631
DB2:
Count all: 5.818485
Count profession: 7.714391
Count females: 8.556377
Count males w/ profession: 9.656739
Or in graph form:
That’s an impressive difference. To be exact, in this example DB2 was between 6 and 7 times faster than MySQL. In the case of COUNT(*), DB2 counted almost a million records in 58 milliseconds, or in about the blink of an eye according to Wolfram Alpha.
For those who are skeptical, please note that DB2 was not manually fine-tuned in any way. The client codepage was set to 1252 to allow Greek letters, and the log size was increased to permit such a huge transaction during the import. That’s it, no optimizations were attempted. This is DB2 Express-C out of the box. It looks like smart androids count electric sheep with DB2 after all.
The advantages of DB2 over MySQL when dealing with a massive volume of traffic are well known (and not limited to performance either), but DB2 can dramatically improve performance even for your average web application. And DB2 9.7, which will be released this month, increases the performance and the ability to self-tune itself to the available resources and required workload even further. If you’d like to try DB2 Express-C for yourself, you can download it here. It doesn’t cost you a dime to obtain and can be used for development, testing and production absolutely free of charge.
What follows is an interview with Nicholas Wieland, CTO of Italy-based Zooppa, a fast growing social network for creative types. This is the second in a series of interviews I will carry out with interesting figures from the micro-ISV and startup scene. If you have a compelling story to tell, own or run a tech startup, and would like to be featured, please drop me a line via email.

1. I’d like to start by tracing your background. What did you do prior to Zooppa?
Programming, programming, programming. I started out working for Neato Europe as their “one-man-band programmer”, building their e-commerce site and taking care of their infrastructure (nothing more than a bunch of servers). In those days my love of FreeBSD, PostgreSQL and dynamic languages started to grow exponentially. As the only employee I had to find a way to produce quantity and quality at the same time, and the technologies above were a perfect fit for the job.
After leaving Neato I did consulting work for a few years, for customers like Monte dei Paschi di Siena and Italian Telecom. Albeit those are big names, it was with the smaller scale customers that I enjoyed working the most. I won’t mention them by name though as they don’t impress people as much as big banks.
I used to work primarily with Python, while developing a growing interest in Ruby, which blossomed when Ruby on Rails was released.
In the meantime I was helping Marco Ceresa writing the first book in Italian about Ruby (thus cheating on Python officially for the first time) and working part-time for Assembla on their Hotchalk project.
2. What led to the creation of Zooppa and how did you become its CTO?
Zooppa came from an idea that Davide Lombardi, an Italian journalist, had to found a company with the help of Riccardo Donadon and his firm, H-Farm, an early stage startup incubator. I joined Zooppa almost by accident, having answered a job posting thinking that it was some kind of consulting position for RoR from a forward-thinking employer. I soon found myself talking with Riccardo and Peter Caiazzi (of Netscape fame) at a wonderful countryside farm, full of fellow geeks. I was immediately sold.
I was first hired as a consultant and a few months later become the CTO. I guess the reason is that I’m a good programmer. You should ask Riccardo.
3. Can you explain to our readers who may not familiar with it, what Zooppa is? (Think an elevator pitch.)
Zooppa is a web application for designers and other creative types. It’s based on a new approach to online advertising and on a value proposition that goes beyond the simple “click” formula. We give our users a brand that is looking for a commercial, they create ads through a competition (videos, print ads, radio commercials, banners or simply concepts), and these ads are voted on by the site’s community. Eventually the ad makers win money (I think we’ve awarded $400,000 to date) based on the popular vote and the choice of the customer who commissioned the project.
In my opinion it’s a wonderful way for people to show what they’re able to accomplish for companies like Google, Nike, TomTom and many others. And based on the number of people from our community who have been hired by these companies, it is clear that the companies agree as well.
4. What kind of funding did the company receive?
No funding other than that of H-Farm. I strongly believe that you need to have a product before you ask for funding. I’m absolutely against the “promise-based” economy we all know. We’re going to be looking for our first round of substantial funding very soon, as we’re now able to show our polished product and our large community (something we couldn’t do one year ago). We have been able to give Zooppa its own character and goals, and we proved that it worked. Now we are able to make promises that we can stand behind.
5. How are things going? At this stage have you been able to be profitable, and can you disclose a few statistics about Zooppa? How many employees, users, pageviews and so on?
No, we haven’t been profitable, but we’re getting very close. We are somewhat akin to a combination of YouTube, Flickr and Facebook (in the sense that we serve videos, images and have a timeline), and we had huge startup costs, so it was basically impossible to be profitable initially, which we knew from the get-go.
We have 40,000 users more or less, 12,000 print ads, 2,000 videos and so on. It’s quite impressive when you consider that these videos are the result of a creative process and not, say, simply the recording of your cat a la YouTube. In terms of employees, we’ve got about 20 people.
6. It seems to me that the idea is innovative, the videos are fun, and there is a solid business model behind it. Why do you think the company has received little attention outside of Europe, especially by specialized blogs that cover all kinds of startups? Can you tell us about your struggle to get exposure?
Oh well, you’re opening a can of worms with that question… We made a huge mistake at the beginning: we focused on our own market without “attacking” the US one. Other than that, we didn’t receive any coverage outside of Italy, even if I did all I could to reach out to the biggest blogs that cover startups. It seems to me that you only get coverage if you are burning VC money or in some way are doing something that’s fashionable at the moment (such as with Twitter right now).
I’ve even seen one of our clones getting more coverage than us, which is kind of ridiculous as that competitor implemented the idea horribly in my opinion. I would say that the originality of the idea doesn’t really matter to such bloggers, just the funding and related issues (not to mention the various possible conflicts of interest…). Honestly this is very hard to swallow.
7. How did choosing Ruby on Rails impact the project?
We are incredibly productive. We normally code a prototype and write specs before putting it online. This is awesome, I can turn ideas into code in no time, test and refactor them later if I realize that performances are not as I would like them to be.
I strongly believe we wouldn’t survive without Rails. I still remember the presentation I gave to RailsToItaly, I just had done a complete redesign and rewrite of the site in 38 days. My presentation’s title was “Productivity with RubyOnRails or how I stopped worrying and learned to love Zooppa”. I think this title speaks for itself.
On a side note, I would also like to say that as an old school web developer and early “Railer” (you can find my posts whining about DB serials stretching as far back as 2004 with answers from DHH himself
). I think we have the best provider ever. I work with EngineYard and their service is terrific. I have no idea how they can offer the sort of support they do and still keep prices so reasonable. Never in 10 years on the web have I experienced the type of service I get from EngineYard. They are one of our most precious assets.
8. As CTO for the company, what are your main duties?
I code like crazy, as I already mentioned, and I take care of our architecture and its evolution. I’m in charge of other developers (http://twitter.com/oscardelben/, http://twitter.com/michelegera and http://twitter.com/smash) and provide them with specs to implement. And I whine about everything. Whining is the defining skill of every CTO, trust me.
9. Where is Zooppa heading and what plans do you have to bring it to the next level?
I want to integrate Zooppa with the major video and image platforms. And with Twitter of course. I would also like to experiment with Sinatra for a Facebook application. As well I’m coding my own blog/static site solution with Sinatra and Metal (I really dislike WordPress). And I do so in my free time, which means BSD license all the way. I also plan to use CouchDB for our timeline.
We have a lot of stuff going, and we’re going to hire more employees, so feel free to send your CV to nwieland@zooppa.com, and be sure to include Erlang and Haskell if you are brave (I received complaints about my choice of technology, because it’s hard to find Ruby developers around here. If I start requiring Erlang and Haskell skills I will definitely establish a record number of complaints here in H-Farm). It’s going to be a lot of fun, really.
I really want to thank Nicholas for his time, and I invite my readers to stay tuned for more interviews. An Italian translation of this interview is available on Stacktrace.it.
Books and magazines have always fascinated me. Perhaps this is due to the fact that until I was nine, my father owned a bookstore and I would spend a lot of my time hanging out in a world of dust jackets and big words. More recently, the internet has brought information sharing to a whole new level and opened up a realm of amazing possibilities. I love this this element of being online to death, but it also means witnessing the decline of (printed) book and magazine sales. After all, the information is out there on the web, and in most cases it’s available free of charge, which makes a lot of people hesitant to pay for a paper version.
Personally though, I feel that the way information is collected and organized in books and magazines still has an important, complementary role. Say that you wanted to learn Scala. You could read about it on the web – there are countless blog entries about it – but it’s hard to beat the cohesive, comprehensive approach of an excellent book about the subject. Likewise, assuming that you were past the first or second book on the topic, you might find the information that’s available online more than adequate, but what a treat would it be to have a magazine that periodically covered the subject with a collection of essays, interviews and other goodies – all authored by the best experts in your particular field of interest.
Presently, Scala does not have such a luxury, given that, while vocal, its community is still relatively small. The great news though is that Ruby however does! In fact, there are now two magazines dedicated entirely to the subject of Ruby and Ruby on Rails, both of which are free of charge if you’re happy with the electronic version (a PDF). Alternatively they can be purchased (at the rate of production cost), if you wish to receive a printed version, just like in the good old days.
The two magazines I’m talking about are “the Rubyist” and “Rails Magazine“. The Rubyist has already put out two copies, while the first edition of “Rails Magazine” just hit the stands. Our community is maturing and the existence of such initiatives is a clear vital sign of the growth that encompasses more than just numerical expansion. These publicarions are far from amateur efforts; both magazines are beautifully laid out, have or are in the process of getting an ISSN, and can boast the commercial support of several sponsors. I was blown away by the quality of the content as well. These are two serious and exciting projects, and we as a community should really get behind them by reading these magazines, blogging about them, answering their call for papers, and if you fee like it, purchasing printed copies.
Those who follow this blog through the feed, may not have noticed it, but over the weekend I had a chance to revamp the look of Zen and the Art of Programming. I used a WordPress theme I’d already employed on Math Blog and customized it, basing my changes on the suggestions of the participants of my earlier survey on the subject. I’m not a web designer by any means, but I’m quite happy with the way it looks and the overall clean feel this new layout lends the site. What do you think about it?
While at it, I also updated my About page and added a thumbnail of the cover of my book to the sidebar. I finished writing Ruby on Rails for Microsoft Developers a couple of months ago and am now waiting for Wrox to do their magic and get it into stores. The book should leave Wrox’s warehouse towards the end of this month and reach customers in early April. But I’ll talk about my book and the subject of writing a technical book more in future posts.
Within the Rails community, New Relic is a company that doesn’t need any introductions. They are synonymous with performance and reliability, thanks to their RPM product for monitoring, detecting, and fixing Rails application performance problems in real time.
What everybody may not have noticed though, is that New Relic started something called RailsLab, a site in which they publish videos and other useful information about scaling and improving the performance of Rails applications.
The first series, known as Scaling Rails, produced in collaboration with my friend Gregg Pollack, is absolutely impressive. The following is a list of the videos they’ve posted so far (they’re also available through iTunes):
I was surprised to see so little mention of these fantastic short tutorials in the blogosphere. These videos are a gold mine of information, which is made all the more better by the fact that they’re entirely free. Do yourself a favor and check out these awesome clips, they’re well worth your time.
A few days ago I wrote a comment on Hacker News. Here it goes.
I hate how being harsh has become fashionable. Whatever happened to manners?
This spontaneous reaction was in response to a blog that attempted to be humorous by using the word “fucking” multiple times in reference to Adobe’s UIs which were perceived as lacking a native look and feel.
I stand behind those words. Acting bitter on the Internet seems to be increasingly gathering the popularity amongst an audience that’s used to being amused and entertained by cheap attacks. Concepts like respect, courtesy, or civility – let alone class – appear to be all but forgotten.
It’s worth caring about this toxic environment, where nastiness and negativity are not only tolerated but to a certain extent encouraged, because of its effects on the community. A community that can be as big as the whole blogosphere or as small as the Ruby world, depending on which particular case you opt to focus on.
By simply fast-forwarding one or two days, we find Michael Arrington’s emotional article about an upsetting encounter with a conference attendee who spat on him, only to quickly leave, hiding himself in the crowd. In the same article he also mentions the serious death threats that he has received due to his popularity through TechCrunch.
You may disagree with Michael’s analysis of the so-called Web 2.0 world. You may also dislike his attitude, but disagreement amongst intelligent individuals has nothing to do with downright psychopathic behavior. Sure, the guy who spat and the wanna-be-murder are two extreme cases, but I feel that these are fomented by a large crowd that considers such acts as being acceptable – and even willingly indulges in verbal hatred against Michael every time he feels like writing about something.
Don’t think that Michael and I are good friends. He probably doesn’t even know who I am, and I have in the past expressed the opinion that sometimes his news coverage is far too gossipy and lacks technical substance. Yet, I felt really bad in hearing about the attacks against him. Such incidents are truly uncalled for.
Arrington has every right to write about what he wants, however he wants to – and to do so without being harassed by the community. As a matter of fact, he made a “small fortune” thanks to his writings, and his achievements cannot be ignored. But if you don’t like his style or his articles, go read something else. If you consider him a “jerk”, don’t visit his site. People have no right whatsoever to be abusive, opting to often hide behind the anonymity and lack of accountability that has become typical of the Internet.
The “irony” behind these forms of cyber-bullying is that the people perpetrating them are often “nerds”, guys who have been bullied in real life. Yet, in front of a keyboard, in the comfortable glow of anonymity, they feel powerful and type away their anger and desperation.
Michael Arrington is just one victim of the results of this high-school like behavior, and this episode is bound to become as popular as Kathy Sierra’s misadventure. Those two are high visible cautionary tales but there are other smaller (or less publicized) occurrences every day.
Despite being virtually unknown, I’ve had my share of negative comments. Because of my technical articles and opinions I’ve been called all sorts of names (and this from a community that’s supposed to be comprised of highly educated professionals). Some have gone so far as to say “I hope you die”. This is, if you ask me, ridiculous. Yet I could write “the sky is blue” and I would get hate emails about it. It’s really hard to have faith in humanity when you are a blogger. Mine was slightly restored by switching to comment moderation, a wise choice that I now consider paramount to any site where I blog.
I also dislike how all this criticism ends up creating prejudices against individuals before people have even had a chance to learn more about them. Case in point: a while ago I heard all sorts of bad things about Gary Vaynerchuk. The most common adjectives seemed to be “jerk” and “douchebag”. So I decided to find out more about him and started watching some of his videos. Guess what? I honestly think that the guy is awesome. He is energetic, has a passion for what he does, and shares his knowledge and love for wine and life with others. He puts himself out there in a very honest and straightforward manner. I find him contagious, funny, a morale booster, and definitely not an unlikable person. Had I stopped at what the critics said, I would have missed the opportunity to learn more about wines and this terrific person.
The last example I’ll give is a very touchy subject, but I feel it nicely wraps up this series of thoughts. After attacking some leaders of the Rails community, Zed Shaw has become a hero in the development community. People love the tough guy who makes them laugh by attacking people they don’t like (and sometimes don’t know) in the first place. This to me is sad. For me Zed is a “hero” for coming up with Mongrel at a time when deploying Rails reliably was problematic, not because he decided to vent his frustration publicly. He deserves respect for the code he wrote, not for attacking people. I saw a few videos of him presenting at conferences. He is highly informative and entertaining, a truly likable person it would seem. For that he commends respect from fellow developers and a beer if I ever meet him, not because he made it fashionable to bad-mouth Dave Thomas or DHH.
The fact that the smart people in the development community fail to see this is discouraging and speaks volume about the petty nature of many humans. As I strive to become a better person and genuinely offer my best to the communities I belong to, my wish is for my fellow Internet denizens to do the same.
Let’s all grow up.
As pre-announced in my two previous posts, DB2 for Mac OS X Leopard is finally available for download. It’s now official, DB2 on Mac is here.
Reflections on DB2 on Mac
Several people, including myself, would happily ditch their virtual machines and start introducing DB2 into their native Mac development stacks. But this milestone represents much more than the immediate implications would have us believe. A few years ago, the idea of giving away DB2 for free would have been met with rejection. Yet, DB2 Express-C came along, and unlike the other “express” databases, it’s a true production-ready DB2 version that can be used free of charge.
Likewise, the idea of having a DB2 version for Mac was unthinkable up to a few years ago. Yet today we finally have a copy of DB2 Express-C for Mac OS X that’s available for download. Aside from this being an acknowledgment of the growing importance of Mac as a development and business platform, I feel it underlines IBM’s ability to change. The desire that a few of us mac addicts had, coupled with reasonable pressure from the community, was sufficient enough to make DB2 on Mac a reality. This matters and appeals to both the developer and the technical evangelist in me.
In the list of downloads, you’ll notice that the Mac download is only 138 MB, versus the 412 MB of Linux’s 64-bit. The reason for this difference is that DB2 Express-C for Mac currently ships in English only, and at this stage it doesn’t include either DB2 Text Search or the Java based tools like the DB2 Control Center. This lighter package is, in my opinion, a welcome side effect of this brand new beta release.
Getting started with DB2 and Rails on Mac OS X
Since the first download went live on Friday, a newer release that includes a guide for installing DB2 on Mac OS X was published and it incorporates a few changes that will make the lives of developers easier, as they approach building and using drivers (e.g. the ibm_db Ruby gem). If you downloaded this beta version over the weekend, do not worry: just grab – and execute – this shell script (e.g. sudo fixlib.sh). If you are downloading DB2 on Mac now, you won’t need this script of course.
Once you’ve downloaded DB2 for Mac OS X Leopard, please proceed to read this PDF guide, which will tell you everything you need to know (and more) about installing DB2 on your Mac, as well as providing extra details. It’s best not to skip over reading this document, as the installation on Mac OS X requires a few more steps than simply running the setup wizard.
With DB2 installed and started (sudo db2start), and the SAMPLE database created (db2sampl), you’re ready to start playing with this power horse. For details about SAMPLE’s structure you can read this article in the InfoCenter.
To run the DB2 console (known as the Command Line Processor or CLP for short), run:
$ db2
To connect to the SAMPLE database, from within the CLP run:
db2 => connect to sample
Unless you get an error, you should now be ready to query the database. For example, run the following query:
db2 => select count(*) from staff
Then to exit from the CLP, simply run:
db2 => quit
If this sanity test worked well you can proceed with installing the ibm_db gem (which includes the Ruby driver and the Rails adapter for DB2). To do so, run the following, adjusting the path to your own username of course:
$ sudo -s $ export IBM_DB_INCLUDE=/Users/acangiano/sqllib/include $ export IBM_DB_LIB=/Users/acangiano/sqllib/lib32 $ export ARCHFLAGS="-arch i386" $ gem update --system $ gem install ibm_db $ exit
The ibm_db gem will be installed on your system and is ready to be used. To verify that this is the case, run a small Ruby program with the following code:
require 'rubygems'
require 'ibm_db.bundle'
conn = IBM_DB.connect("sample","my_username", "my_password")
if conn
stmt = IBM_DB.exec(conn, "select count(*) from staff")
count = IBM_DB.fetch_array(stmt)[0]
puts "The staff table contains #{count} records."
else
puts "Connection error: #{IBM_DB.conn_errormsg}"
end
If everything is fine and dandy, you should see the message “The staff table contains 35 records.”.
Now that Ruby can talk with DB2, we can move on to Rails. Assuming you have Rails 2.2.x installed, run the following to create a sample bookshelf application:
$ rails books -d ibm_db
This generates a Rails application (as usual) with a config/database.yml file customized for DB2. You’ll notice that unlike with MySQL, the database names are not books_development, books_production and books_test. The names are truncated by default due to the fact that DB2 currently only allows for database names that are up to 8 characters long. Feel free to change the development database in database.yml simply to ‘books’.
As a Rails developer you may also be accustomed to running rake db:create to automatically create the development database, yet this feature is not available for DB2 at this point, so instead you can create the database using the db2 command, as follows:
db2 create database books
DB2 allows you to specify all kinds of options for the creation of databases, but in its simplest form, the line above will work just fine.
Once the development database has been created, you should be able to use Rails with DB2 as you normally would with other database management systems. For example, you could scaffold a resource as follows:
$ ruby script/generate scaffold Book title:string author:string isbn:string description:text loaned:boolean
Start the webserver with:
$ ruby script/server
And then visit http://localhost:3000/books to perform CRUD operations on book records.
At this stage, the only caveats are that you’ll have to use the db2 command, rather than ruby script/dbconsole, and that you won’t be able to use the rename_column method in your migrations. On the plus side, you’ll have the XML datatype (t.xml in your sexy migrations) at your disposal, to natively store XML documents and retrieve them through XQuery and SQL/XML.
I really hope that you’ll enjoy DB2 on Mac! Don’t be afraid to ask for help, if you need it, in the DB2 Express-C forum. Oh and we are trying to get the word out there. Your help is highly appreciated. You can promote this story on Twitter, Hacker News, Reddit, DZone, StumbleUpon and Digg.
Disclaimer: The opinions expressed in this post are mine and mine alone, and do not necessarily represents the opinions of my employer, IBM.
The most effective martial artists specialize in their discipline, but are not afraid to cross-train in others. Bruce Lee—arguably the most famous and influential martial artist of the past century—trained first in Tai Chi Chuan, then Gung Fu, and boxing, as well as learning western fencing. The insight taken from so many disciplines led him to create the Jeet Kune Do form of combat.
Programmers are not all that different. Cross-training in other languages and frameworks can only improve one’s overall mastery of the craft. When it comes to Ruby frameworks, the two most popular choices are Ruby on Rails and Merb. They’re often seen as being contenders, but this truly isn’t a zero-sum game; learning both is a very sensible move. They both enable you to write web applications in Ruby, and are somewhat similar, so learning one after you know the other shouldn’t be very challenging. In the many cases people learn Merb after they’ve had some experience with Rails, but either way, acquiring a solid grasp of both frameworks provides developers with extra flexibility. Often people who learn both, will end up mostly just using one or another, depending on their individual preferences. But it’s worth knowing them so as to be able to write both CRUD-style applications that fall within Rails’ solution space, and more complex, edge cases where Rails’ opinions will end up contending with yours.
Among the reasons to give Merb a chance, is its focus on performance, a smaller memory footprint and an extreme level of modularity, which enables you to pick and choose which components you’d like to use.
Merb is not as mature as Rails, of course, but it has reached version 1.0.x and with it developers can have greater confidence in a more stabilized API. Now is perhaps the best moment to get involved and learn more about this rising framework. Not surprisingly though, Merb finds itself in a similar spot to the one that Rails was in a couple of years ago (in terms of weakness of documentation when it comes to getting started). Thankfully, this point is being taken seriously and there’s been some major progress in terms of improving the documentation for Merb. Below are some useful links to get you started with Merb.
Merb has an official API documentation, a wiki, a google group, and a community site called Merbunity for news, projects and tutorials. The irc.freenode.net #merb channel is also a useful and welcoming spot. Furthermore, there is a Peepcode PDF draft called Meet Merb. If you want something even more substantial, on the book front there are several titles coming out in the near future. These include Merb in Action, The Merb Way, Beginning Merb and Merb: What You Need To Know. There is also an open source Merb book, whose development is led by Matt Aimonetti. It’s a work in progress, but probably a very good starting point, which just happens to have the added bonus of being free. And if your interested in Merb, don’t miss InfoQ’s interview with Yehuda Katz, who’s Merb’s lead developer and one of the sharpest guys we have in the Ruby community.
Finally, if you are a professional developer who wants to quickly progress with Merb and bring their skills to the next level, do not miss your chance to attend a three day intensive course on Merb, which is being offered by Yehuda and Matt in Phoenix, AZ between January 19 and 21 (2009). Registration has been open for two days already and 20 out of the 30 available spots have already been snapped up. The remaining seats won’t last more than a day or two, so if you are interested, don’t delay (sign up now and you’ll also benefit from an early registration price).
2009 is almost here, so why not take the opportunity to learn Merb this year?

This is not an official announcement, but I must share the news with you. DB2 Express-C for Mac OS X Leopard will finally be shipping out (before Christmas), in all likelihood it could be as soon as early next week. You may recall how more than a year ago I blogged about how the work on porting DB2 to the Mac had started. It took admittedly longer than expected but DB2 on Mac is coming, and is absolutely free of charge, of course. The team is still playing with the bubble wrap, but DB2 on Mac is a reality.
What took IBM so long? DB2 is a database management system that’s highly optimized for each platform that it’s available for, so that it can take full advantage of the operating system at hand. In other words, porting DB2 from one platform to another, is not so trivial. The task is made more challenging by the extremely high standards set by IBM. You may be familiar with the whole scandal surrounding MySQL 5.1, which was released despite known fatal bugs. Something like that is simply not acceptable to IBM. Each release of DB2 has to go through a huge amount of regression and performance tests – for months. If the product does not pass all these tests and others, then DB2 is not shipped.
On top of this, a few months ago the decision to ship DB2 Express-C 9.5.2 (rather than 9.5) was made, and as you probably know, DB2 Express-C 9.5.2 was only released a little while ago for other supported platforms. So the first piece of good news is that you’ll get the latest version of DB2 on the Mac. It’s going to be a 64 bit version and will require Leopard to work:
$ db2level DB21085I Instance "acangiano" uses "64" bits and DB2 code release "SQL09052" with level identifier "03030107". Informational tokens are "DB2 v9.5.0.2", "s081205", "DARWIN64", and Fix Pack "2". Product is installed at "/Users/acangiano/sqllib".
The second good thing is that unlike MySQL 64 bit, you won’t have to jump though hoops to build the Ruby driver due to the fact that the database is 64 bits and Ruby ships on Leopard as 32 bits. We ensured that gem install ibm_db would work out of the box, so you don’t have to.
According to Apple, my personal Mac is broken for good (the video chip is dead), which is very bad timing. But I installed DB2 and played around with it on a work Mac Pro machine. I had some fun with Ruby and Rails as well. This is great news for many categories of developers, including those who have been trying to convince their managers to get them a MacBook Pro but didn’t have much of a case due to the lack of availability of a DB2 version. Now, you’ll have a good excuse to get yourself a Mac.
Stay tuned for the official announcement and keep in mind that this is going to be a beta (perfect for development purposes) and extra features and performance improvements will be added in future releases.
Disclaimer: The opinions expressed in this post are mine and mine alone, and do not necessarily represents the opinions of my employer, IBM.
Yesterday I published The Great Ruby Shootout and it quickly gathered a fair deal of attention. It was on the front page of Slashdot, Hacker News, Reddit, and so on. More than 15,000 people came by to read about the results of my comparison between Ruby implementations.
Those numbers looked good but something didn’t add up. Ever since I clicked the “Publish” button, I had a very uneasy feeling about the main shootout figures. They just didn’t seem right. I had a chance, particularly during the writing of my book, to extensively use Ruby on Vista and I can guarantee you that it’s visibly slower than on GNU/Linux. The Phusion team had benchmarked their Ruby Enterprise Edition against Ruby 1.8.6 many times, and found it to be about 25% faster. Yet my results were showing it as twice as fast than Ruby 1.8.7, which in turn is already faster than 1.8.6. To makes things worse, I’ve used Ruby 1.9 and found it to be faster than Ruby 1.8.7, but not 5 times as fast. For most programs that I tried Rubinius didn’t seem faster than Ruby 1.8. And the more I pondered it, the more it began to feel like one too many things didn’t add up.
In the comments, Isaac Gouy reported a couple of issues with the Excel formulas, where a few unsuccessful tests were mistakenly added to the totals. This skewed the results slightly, particularly in terms of penalizing JRuby. However, this wasn’t really it. Sure, the totals were inaccurate, but not enough to fundamentally change the main outcome of those results.
As I was discussing this somewhat unexpected result with Hongli Lai (co-author of Ruby Enterprise Edition), he mentioned that he knew what might be causing this anomaly. I had run the initial test against Ruby installed through apt-get, because I’d made a couple of assumptions. The first was that most people would probably be using the Ruby version that was deployed by their OS’ packaging system in both development and production mode. The second was that the performance of this version would be roughly similar to the one built from scratch. This second assumption would turn out to be highly mistaken.
I decided to run a test using Ruby 1.8.7 built from source as the baseline and added a column for Ruby 1.8.7, installed through apt-get, to the tables. In addition I also corrected the issue pointed out by Isaac. I updated the original shootout with the correct data, and what you see below is a bar chart for the geometric mean of the ratios for the successful benchmarks.

Notice how everything makes much more sense now. Ruby 1.9 and JRuby are very close, respectively 2.5 and 1.9 faster than Ruby 1.8.7 (from source) on these benchmarks. Less impressive result sure, but I suspect much more realistic. The results for Ruby Enterprise Edition are in line with the 25% speed increase, if we consider that 1.8.7 is a bit faster than 1.8.6. Rubinius is still slower than MRI for most tests, but it’s improving. Ruby on Windows is slow. So slow in fact, that Ruby on GNU/Linux is twice as fast.
The really big, flashing warning though is what happens when you install Ruby through apt-get. Compiling from source gives you double the speed, according to these tests. I expected a 10/20% increase, not 100%. The gist of it is that prepackaged Ruby is compiled using the option –enable-pthreads and there is the whole issue of shared vs static libraries. But whatever the reason, this is a significant difference. For production use, in light of these results, I feel that it would be foolish to use the slower version of Ruby provided by apt-get/aptitude.
I rectified the results as soon as possible because the last thing I wanted was to mislead the Ruby community or worse still, betray its trust. Major kudos to Isaac for spotting the calculation issue, and Hongli for selflessly pointing out that the excellent Ruby Enterprise Edition results were probably due to the low performance of the Ubuntu’s version of Ruby.