Wednesday, June 24, 2009

Substruct Web Store (Tutorial)

The goal of this article is to provide a detailed step-by-step introduction to installing Substruct for Debian (unstable). I installed Substruct on my Windows system, but server loading times were inordinately slow and I got the impression that it was putting an unnecessary burden on my local machine's processor.

Then, when I migrated my installation and database to a Debian system, I had strange problems crop up, like the "Not ready to buy yet?" message would not appear, and my "Add this item to your wishlist" button would start overlapping the "Add to Cart" button. Not cool! So, I decided to gut the provided installation of Ruby and try installing Substruct from scratch.

First step is to download Ruby from the Download Ruby website, compile and install. I recommend the old version 1.8.7, which you will have to dig out of the FTP archives; they are pushing ruby 1.9.1 now, which doesn't have support for the ftools library, something that's used by Substruct; you will surely need some basic developer tools installed already to begin the ./configure; make; make install procedure. Once you've got them all and started the compile, go and make yourself a sandwich. Should take 5 minutes unless you're strapped for memory.

Now that you have your own custom installation of Ruby, you'll need some Ruby Gems to commence the Substruct installation. Get the latest version of both, and follow the instructions to install Ruby Gems (basically ruby setup.rb), then install the gems required by Substruct (gem install RedCloth fastercsv mime-types mini_magick ezcrypto).

Someone needs to use the computer. I'll finish this debugging process later.