I'm not trying to evangelize AIML, far from. I did spend a day learning and exploring what it was all about, and hence, ended up with some tools that make use of it.
I don't know, it's late and I should go to bed.
This little chat app makes use of the Sinatra Streaming API and the programr gem to let you interface with an AIML chatter bot.
The streaming stuff is from https://gist.github.com/1476463 and should be pretty straight forward.
AIML INFO: http://www.alicebot.org/aiml.html
You can find a more complicated set of ALICE AIML files which have better examples of what AIML can do hosted at http://code.google.com/p/aiml-en-us-foundation-alice
Some of them have thrown errors in programr so a subset is available here: https://github.com/robertjwhitney/alice-programr