Bernie Thompson -- Tuesday, November 21, 2006
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:
- Finding a useful utility
- 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.
- 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.
- One-click install (1.8.5 r21)
- Get DarwinPorts
% port install ruby rubygems
% 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
- The installation process is standardized
- Upgrades are as simple as
% gem update
- You can tell what’s previously been installed with a simple
% gem list
- Gems build on each other, and are able to install what’s needed automatically (dependency handling)
- 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.
- Gems should provide a bit more consistency in supporting multiple platforms, or declaring any platform dependencies
- Gems should consider adding GUI frontend for any scripts (as I should do for filebydate)
- And some ideas for rubygems …
- Create a gui frontend for rubygems itself
- 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?