Archive for October, 2007

Old Software Never Really Dies

I just got a support request from someone today for a web application that I helped to write in college. It was my first Rails project and it was made as a senior class project. We had a client who was a professor from another department. We had to write our own version of backgrounDRb, used an early version of Rails, and wrote Flash as the front-end to an annotating engine for documents.

It was a great success for us using Rails and Ruby for the first time. We easily exceeded all expectations set in the beginning of the 10 week class. We had demo screencasts, a professional looking site, a great code/test ratio (first time ever for me), and a very happy customer. Some departments in our school were seriously considering using it for their document collaboration needs, and apparently, the software found its way around the world entirely by word of mouth.

I haven’t touched the code in several years and the machine that housed the subversion repo is long gone. It got me thinking about how software never really dies. I had no idea these people were using it to this day, but it still lives out there. I don’t even have the original site up anymore, so there’s no place to download the code.

It’s sort of cool and strange knowing that something that I wrote as a class project is being used by people to actually get work done. Maybe I’ll pick it back up and polish off the old code and breathe some new life into it someday. It’s just weird to think of a Flash/Rails app I wrote a few years ago as “old.” There’s going to be more of that in the future and it’s a refreshing reminder that everything old is new again and software never truly dies.

ScreenGrab! For Firefox

I just stumbled onto this little gem the other day while looking to roll my own solution to a problem.

ScreenGrab!

It takes screenshots of an *entire* webpage like Paparazzi!, but in Firefox. It can save directly to a file or straight to the clipboard. It’s a helpful tool in testing and analysis work and is another tool I use every day. Check it out, you won’t be disappointed.

Install Old Versions of Ports Using MacPorts

MacPorts is my preferred way of installing, managing, and upgrading much of the software I have on my Mac.

I’m setting up a new work machine today and I need to install ruby 1.8.5 on my machine for Rails to be happy.

Unfortunately, you can’t do something simple like specifying the version of the port you want to install unless it’s in a local repository.

Fortunately, my friend Stephen Chu had this problem about a year ago and has a nice procedure on how to do it. I’m going to update it for MacPorts and ruby 1.8.5 here.

1) Find out the svn revision number of the Portfile that has 1.8.5 by looking at:

http://trac.macosforge.org/projects/macports/log/trunk/dports/lang/ruby/Portfile

In my case it is 21127.

2) Set up a local port repository. In the file /opt/local/etc/macports/sources.conf, add this line before the rsync line:
file:///Users/Shared/dports and create that directory.

3) Install the port into your local repository.

cd /Users/Shared/dports && svn co --revision 21127 http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ lang/ruby/

4) Run portindex so that ports now finds your new (old) version of ruby.

portindex /Users/Shared/dports

5) Now you should be able to see ruby @1.8.5-p12 in addition to @1.8.6 by running:

port list

6) Install Ruby

sudo port install ruby @1.8.5-p12

You should be up and running now, so to check, run:

ruby -v

You will see something like this:

ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.10.1]

Now, if you want versions of ruby that MacPorts doesn’t have (later patchlevels for instance), you can modify the portfiles by hand, but I’ll leave that for another post.

Update: There is an “official” MacPorts HOWTO on installing older versions of ports here. It may be updated in the future, so I’m linking to it here: http://trac.macports.org/wiki/howto/InstallingOlderPort

Install Old Versions of Ruby Gems

I am setting up a new machine that has some old software requirements for my project this week. A quick tip if you need gems to be installed at an older version (if they are still available).

Use the -v version flag to specify which version you want.

sudo gem install capistrano -v 1.4.1

If you’ve got the newer versions of the capistrano gem, no need to fret. You can specify the version you want to use on the command line like this:

cap  _1.4.1_  deploy

You can alias that to something else in your bash profile by adding something like this:

alias cap1='cap  _1.4.1_'