wiki home | RecentChanges | preferences | index | random

Gemcast is a weblog engine that I wrote in Ruby. It is currently serving up the weblog for my site. I wrote a number of weblog entries about it when I was actively working on it, but once it became about as featureful as I wanted, I stopped thinking about it much.

The latest version of gemcast is 0.1.0. Download it.

Note that there are installation instructions in the tar file, but they are pretty much the bare essentials. Sorry about that. I never got gemcast's feature set up to that of most weblogs, so I never documented it thoroughly, assuming that folks wouldn't care much about it (and they haven't - it's gotten maybe 10-20 downloads since I started posting it, and I haven't heard from anyone that's using it).

Here is the readme file included with the release, in case you're interested:


gemcast README



Gemcast is a blosxom-like weblogging engine written in Ruby. By blosxom-like, I mean that gemcast uses the filesystem as its "database" of log entries (although I've gone to some pains to keep this dependency somewhat abstracted in the code). I wrote the first version of gemcast in a weekend, while also learning Ruby. While writing gemcast, I referred to James Britt's Blogtari! weblog engine, also written in Ruby. I didn't use any of his implementation or design whatsoever, but gemcast's specification is somewhat like Blogtari!. I didn't even look at blosxom (or the ruby Cherry Blosxom) implementation.

Currently gemcast runs as a normal CGI program, meaning that it's not compatible with FastCGI? or mod_ruby. I just don't care enough about performance at this point to worry about it.

The main bits to understand about gemcast are:

- It uses a filesystem-based repository. This means that it reads files (ending in .txt and .box) from your data directory (configured in config.rb) and renders them into a (currently only HTML) page.

- .txt files are rendered as dated log entries - the main content of the site.

- .box files are rendered as 'sidebar' entries - the auxiliary content of the site.

- Content can be organized into subdirectories (known as categories) however you choose. Sidebar content (.box files) contained in a given directory is presented only when the user's context is that directory (I'm questioning this decision a bit, but that's the way it is for now).

- It "pours" your body, entry, and box content into templates that are kept in the ./templates directory (or wherever you configure it to look). The templates allow you to separate your content from its presentation. During generation, values are replaced into the templates, including the log entry text, box text, dates, etc. Variables are specified in the templates using Ruby's replacement syntax: #{variable}.

- It uses (to some extent) blosxom's URL format for querying blog content. The extent to which it does this is based on how much effort I've put into that aspect of it as of any given version. Currently, it:

-- respects URLs of the form http://gemcast.rb/some/subdirectory, which displays all .txt files in that directory

-- respects URLs of the form http://gemcast.rb/directory/blog_entry.html, which displays that particular entry from that particular directory/category. Sidebar content is also derived from the category.

- It has been production tested under Apache running on Solaris 7 on a Sun Ultra 1 (older versions, and Mac OS X (current version).



Follow these steps to install gemcast (I'm assuming you have Ruby and Apache already set up):

0) Copy the script files (*.rb) into a directory you've set up as a script directory, say '/website/weblog'. Make sure that at gemcast.rb is executable.

1) Tell Apache about the script directory in httpd.conf:

   ScriptAlias /weblog/ "/website/weblog/"

2) Set up a gemcast_data (or whatever you want to call it) directory to hold your content. The distribution tar includes some goofy test data that you can use to test your installation:

3) Configure gemcast by modifying the config.rb script. The script is fairly well-commented, so you should be able to figure out what to do with a minimum of fuss (I hope).

Stuff that needs doing (as of v0.1.0)


First, gemcast is probably a very naive implementation of how a Ruby blosxom-like weblog should be done. I kind of hacked it together while I was learning Ruby, and so it's probably not good idiomatic Ruby, and the design is likely very questionable (at least it's divided fairly well into classes, and those classes are in reasonable "modules"). I've made improvements sporadically over the couple of years that it's been running my site, but even then there's surely still room for improvement. My approach to generating the content is probably the most questionable part. On the one hand, it strikes me as powerful, on the other hand it strikes me as not powerful enough to account for the complexity of the implementation. You be the judge. Write me if I'm wacko.

There's a lot of stuff that gemcast doesn't do, that I think it should before I make it 'real' and announce it anywhere:

- "Flavors". Pretty much required in order to be a blosxom clone. However, being a blosxom clone wasn't my main goal - I just liked the idea of a filesystem-driven weblog engine.

- RSS feeds. Should be do-able via flavors, when implemented.

- Date queries. Currently, gemcast only allows weblog "queries" by category structure. Most blosxom-style weblogs allow queries by date, which allows archiving features. While implementing this is not conceptually hard (just requiring the FileStore? class to do some decision-making about what the query is asking for, and returning the files that satisfy it), I've lived without it for quite a while.

Back to software development

wiki home | RecentChanges | preferences | index | random
This page is read-only | view other revisions
Last edited February 5, 2006 4:42 pm by Mike (diff)

Site Meter