Scanty on Dreamhost

ruby dreamhost sinatra scanty

Fri Oct 09 09:20:21 -0700 2009

I didn’t use capistrano, or really use any best practices whatsoever. This was a quick and dirty straight-to-the-server install.

Scanty is an extremely lightweight blog written using Sinatra and Sequel. Here’s how it was rolled out here.

I ssh’d into the server and just cloned the repo to a temporary folder. Then I moved everything in the repo to the directory for this domain. The domain had already been set up in Dreamhost’s panel to use Phusion Passenger, and had it’s web directory set to ./public.

The config.ru was edited to look something like this. I did vendor sinatra, but I did not bother to vendor rack, since Dreamhost now seems to have updated that gem to 1.0.0.

When I tried to visit this domain after completing the above steps, I saw a passenger error. I had chosen to simply stick with Sqlite3 for the database, and an unrecognized token "`" error was being raised. Evidently sqlite3 uses the backtick to delineate entity names, but it wasn’t working (though it did work locally, fwiw). Honestly, I spent a little time trying to figure it out, and I never found a solution.

So I wound up altering the sequel gem minutely; in sequel/sequel_core/adapters/shared/sqlite.rb there is a method called quoted_identifier, which added backticks (`) around identifiers (e.g., entity names). Changed the method body from “`#{c}`” to “#{c}”. Problem solved, and scanty was up and running.

blog comments powered by Disqus