Ruby as an OS-independent application platform

I originally wanted to write a little post to help non-nerdy friends install filebydate, my simplistic picture organizer. This does that, but also covers some larger issues that were so well put in this email I got:

As I sit here building a new machine, I’m thinking of all the little shareware utilities I have and how long it takes to set them up. Last time I built a machine, I spent forever just finding installers for all these buggers. It strikes me there are three problems:

  1. Finding a useful utility
  2. Deploying utilities on any computers you have – not just installing a new utility, but having a list of your favorites and being able to say Set Me Up and it’ll install everything on your list.
  3. Keeping them up to date – I like to have the latest versions, but it takes forever to go to each site and check for an update – especially when several of these apps have plugins. (just getting a slimserver up to date with all its plugins can take a half hour).

‘twould seem like a niche begging to happen…

This email came from my friend Rob, a very computer-savvy guy. These kinds of problems are much worse for a novice user.

The trouble has been, although there are some good single-platform solutions to this kind of problem for open source software on Linux or Mac (which you can see below in the Ruby install steps), there hasn’t been a good, unified cross-platform solution. But working on my little ‘filebydate’ Ruby gem has got me thinking how the Ruby language, libraries, and runtime are getting tantalizingly close.

Even for a novice, it’s easy to install Ruby. Even if you never want to write a line of code, this can be nice, because Ruby includes its own package manager (rubygems) which makes finding and installing useful ad-ons easy. All this is cross-platform — it can work whether you’re using a Windows, Mac, or Linux box. Getting started can be summarized in one or two steps.


  1. One-click install (1.8.5 r21)


  1. Get DarwinPorts
  2. % port install ruby rubygems

Linux (Ubuntu)

  1. % sudo apt-get install ruby irb rdoc rubygems

Try it if you don’t already have Ruby! Once you’ve got this done, installing a ruby library or application on any of these three platforms is as simple as running

% gem install filebydate

on the command line. This command will go up onto the internet, see if this thing called ‘filebydate’ exists, download it, install it, and put any scripts (like ‘renwdate’) in your path so they’re also usable from the command line.

It’s like downloading a typical program installer, except that

  1. The installation process is standardized
  2. Upgrades are as simple as
    % gem update
  3. You can tell what’s previously been installed with a simple
    % gem list
  4. Gems build on each other, and are able to install what’s needed automatically (dependency handling)
  5. When you move to a new computer (even running a different OS), it’s easier to get the same programs re-installed

All this is nice, but it’s obvious that most normal computer users will simply say “you lost me at ‘command line’”. To make Ruby more viable as an OS-independent application platform, there’s a few things we Ruby developers have to do.

  1. Gems should provide a bit more consistency in supporting multiple platforms, or declaring any platform dependencies
  2. Gems should consider adding GUI frontend for any scripts (as I should do for filebydate)
  3. And some ideas for rubygems …
    1. Create a gui frontend for rubygems itself
    2. Add a section in the gemspec for some post-install, platform-specific processing for all supported platforms (e.g. to add shortcuts to start menu on Windows, etc.)

Is Ruby the only game in town? Not by a long shot. There’s ppm for Perl, pypan for Python, any of the Linux package managers, solutions like Macromedia Central (Flash), or any number of others — but most are either not multi-vendor, not multi-platform, or aren’t as well matched to the problem as Ruby and rubygems.

So are Ruby and rubygems ready for prime-time as an OS-independent application platform? Not yet, but they’re usable today and getting closer all the time.

Do you have a better, preferred set of technologies to start solving these problems?

Technorati tags: computers and Internet, software, ruby

Comments (1) to “Ruby as an OS-independent application platform”

  1. Ruby as an OS-independent application platform…

    Yeah, why? Your typical Mac comes with all the Unix goodies and goodness you could ever need. But there are a bunch of Linux PPC distributions that you can, if you feel the urge, install on your Apple hardware.
    If you’ve been alive the last coup…

Post a Comment
(Never published)