After attempting to help a friend new to programming to install the free GLASS stack that gives you a superb app server, web app development environment and transparent object persistence, and seeing his frustration, I decided to boil down the steps, since although they’re not complicated, the various steps are not found together and trying to sort out what is actually necessary is less than simple.
First, the requirements:
GLASS stands for Gemstone/S, Linux, Apache, Smalltalk and Seaside. As the name implies it runs on Linux. It also runs, as it happens, on Mac OS X just as well and just as easily. I’ve followed the same steps on both and both worked identically. If you happen to run Windows I’m afraid there is no Gemstone 64/S for Windows. Although the development environment, Pharo Smalltalk, does run on Windows, since you would still need a Linux VM in order to run the app server / object server, you might just as well install a Linux VM and run your Pharo Smalltalk environment in it as well, since they offer a one click download for Linux, and configuring a base Pharo install to work with Gemstone requires that you know a bit more about Smalltalk than most beginners.
The first thing to do is to open a terminal window. While you could download the zip and manually install it, let’s face it: beginners hate manual stuff as much as I do. Instead follow the instructions below to install the Gemstone/S server:
- Right click on installGemstone.sh, and click “save as”, remember where you saved it.
- Open a terminal and go to the directory you downloaded it to.
- Type chmod +x installGemstone.sh. Now type ./installGemstone.sh followed by the version, the latest current is 18.104.22.168, so it would be ./installGemstone.sh 22.214.171.124. For those unfamiliar with *nix (which includes OS X) note the period before the slash. It has to be there.
Watch the terminal window, or go grab a coke, your preference. It will install Gemstone 64/S to /opt/gemstone/product, including a specific subdirectory under product called seaside, which contains the web framework (Seaside is the original of Rails, for those who have heard of Ruby on Rails, and works very much the same way – the original author was even the same person!).
At the end of the install will be a little blurb from the folks at Gemstone, the important part is the line that reads: source /opt/gemstone/product/seaside/defSeaside
You need to copy this line somewhere, into a text file or notepad or whatever. You’ll need to paste it in and hit enter anytime you want to start up the Gemstone server, so you might as well keep it as handy as possible. It sets all the environment variables the way Gemstone expects them.
Now you can fire up the server, type:
That’s it, you now have a running Gemstone server.
Now for the development environment:
We’ll assume for the moment that you’re reading this blog while 3.1.0.x is still current, at least as far as free versions go.
- Download the following zip file: GemTools-1.0-beta.8.7-310x.zip
- Use whatever unzip utility is handy and unzip the file.
- Double click the Pharo file, it should show up as a single file with a specific icon on Mac, on Linux you will see other files but the one that simply reads ‘Pharo’ is the one you want.
You should then see something like the following:
The first (and likely only) text item should read Glass, if you click it you will get one popup menu choice that reads ‘Update Gemtools’, select it and choose the default option that it gives you (which should be the same version you downloaded – but this ensures last minute changes get into your image even if they didn’t get into the download).
Next, choose “New Session” from the horizontal menu below the text.
GemTools will first ask you the session type, choose standard, and it should present you with a dialog similar to this:
Change the values for stoneHost and gemHost to localhost (or 127.0.0.1)
Optionally change name to something more meaningful than ‘standard’. Click ok.
Prior to starting your session, click whatever you named it and you should have two update options, the second being “Update GLASS”, click that option.
Ensure that whatever you named your session is still highlighted and click ‘Login’. Within a few seconds you should be logged into your server.
Of course, you don’t know how to program it yet unless you’re secretly a Smalltalk guru, so you’ll probably need some tutorials and maybe a book or two
The books you can read online or download from http://pharobyexample.org and http://book.seaside.st/book. The first is absolutely free, even the downloaded version, the second is a nominal 14 Euros for the download, but the online version is free.The 14 Euros helps those Smalltalkers who spend way more time and money creating this stuff than they’ll ever make, so if 14 Euros is not your budget for food for the coming week, it’d be nice to splash a bit on them.
Tutorials aplenty are available at http://seaside.st/documentation/tutorials
The Seaside community, including blogs by the authors and power users, articles, extension projects and other good stuff is available for perusal at: http://seaside.st/community
Finally, the Gemstone/S Documentation can be found (including a more confusing version of this set of instructions at http://seaside.gemtalksystems.com/
The people at Gemstone are brilliant and Gemstone is a phenomenal product. The SMB version is now available for no cost, and that’s a huge boost both to me personally and the Smalltalk community. The only difficulty is that they develop the product so quickly it’s difficult for things like the Wiki and associated documentation to keep current.
The other difficulty is describing precisely what it is and what it does, and why you should be excited about both. The developers managed to pull off a version that does similar things (well, really, about half as much) as the Smalltalk version but in the corporately popular Java language and as a result the Java half of the company was almost instantly swallowed up by VMWare, so there must be something to what it does, even if I can’t describe it without bringing out yawns and people making excuses to leave.
Rather than do so (hey, I need some company too) I’ll just leave you with Gemstone’s own description. Just try to imagine at least a couple of exclamation points at the end of every sentence – don’t be fooled by how dry the description sounds. (Ok, sure, if you’re not a developer, it probably really is dry. But then why did you get all the way to the bottom of this post?)
GemStone/S combines an enterprise class application server, a robust object database, and a multi-user Smalltalk virtual machine. With the addition of the open source Seaside framework, and other add-ons such as script.aculo.us, and the Pier CMS, GemStone/S provides an excellent platform for deploying dynamic web applications with transparent persistence.”