While the strict definition of GLASS (GemStone, Linux, Apache, Seaside, and Smalltalk) specifies a particular technology for each layer of the stack, other technologies can be used for the OS (e.g., Mac OS X), the web server (e.g., lighttpd or nginx), and the web framework (e.g., AidaWeb). I’ve been running GemStone/S 64 Bit on Mac OS X for some time and have had a local (laptop) configuration much like the tradition Linux setup with FastCGI routing requests to three gems that receive and process Seaside requests. This worked well at the beginning when Mac OS X included FastCGI (as part of its built-in support for Ruby on Rails). This has changed in the later releases; starting with 10.7 (Lion) and continuing with 10.8 (Mountain Lion), FastCGI is no longer included in the operating system. This has broken my setup.

GLASS uses FastCGI to route requests to long-running server processes (typically a Topaz process) that remains logged in to the GemStone database. The Topaz processes can run on a different host from the web server (Apache or whatever), using the ‘ExternalServer’ (discussed here and here). While FastCGI is sometimes thought to be out-of-date, it is more accurate to say that “There is not much development on FastCGI because it is a very stable protocol / application.” Apache now provides a fast cgi module (here), that is commonly described as a replacement to mod_fastcgi, but it doesn’t support the external server configuration used by GLASS.

Getting GLASS to work on Mac OS X 10.8 requires jumping through some hoops, but now that I’ve done it I’ll describe the steps I took (please feel free to suggest alternatives in the comments).

I used the App Store application to find and install Xcode (4.6), then installed the command line tools (from Xcode Preferences->Downloads or from Apple). Next, I installed the latest MacPorts. Then, from a Terminal I entered the following command:

sudo port install mod_fastcgi

This did a full Apache build, but also created the needed modules. Instead of running the MacPorts build of Apache, I copied the new module to the expected directory:

sudo cp /opt/local/apache2/modules/mod_fastcgi.so \
    /usr/libexec/apache2/mod_fastcgi.so

Then I was able to run my usual setup with FastCGI on Mac OS X 10.8!

Advertisements