Skip to content
John Pagonis edited this page Sep 28, 2017 · 18 revisions

A simple to understand, run and maintain Ruby blogging engine

Rethoth is written in Ruby and based on Ramaze and Sequel. Its simple and elegant architecture, minimalist feature set and extensible codebase make it both fast and easy to customise.

For a quick visual introduction to Rethoth, check out the lovely Screenshot Tour.

Rethoth demonstrates how to easily build a useful MVC-style app in Ruby without having to deal directly with meta-programming and DSL magic. It is an example of how to build a web application in Ruby without the need to learn Rails and ActiveRecord.

Rethoth is ideal for newcomers to Ruby who have experience with other web frameworks and want to quickly appreciate the language and become productive with it.

Rethoth used to be called Thoth, but we had to change its name due to a namespace clash on RubyGems.org. Rethoth is a modern port, to 2017, of the original Thoth created by @ryangrove.

Features

  • Blog posts and pages - Blog posts are taggable and can be commented on, while pages are for non-blog content.
  • Wiki-style linking - Easily link between blog posts and pages using wiki-style links.
  • Glorious markup - Use "Textile":http://redcloth.org/textile or XHTML for formatting of blog posts, pages, and comments. If you want to, you can even use both at the same time.
  • Media uploads - Easily upload images, videos, and other files and include them in your blog posts and pages.
  • Feeds - RSS 2.0 and Atom 1.0 feeds of recent posts, recent comments, and comments on individual posts.
  • Painless customisation - You don't have to recreate every single template to customise the look of your site. Custom themes inherit from the default theme, so you only need to override the pieces you want to change. This makes upgrading easier as well.
  • Plugins - It's easy to add custom functionality to Thoth by creating simple plugins. You can even share your plugins with other Thoth users by distributing them as gems. Thoth already includes plugins for Flickr, Delicious, and Twitter.
  • Easy administration - Other blog software requires you to switch to a clunky administration interface to perform administrative tasks, but Thoth's administrator tools are integrated right into the blog itself as contextual toolbar icons.
  • High performance - Even with caching disabled, Thoth can handle 20 to 30 requests per second on a decent server without breaking a sweat. With caching on (which is the default configuration), that number jumps to upwards of 300 requests per second.

Installing Rethoth

To install Rethoth using RubyGems, open a terminal and type:

$ gem install rethoth

Depending on your choice of database, you'll also need to install either the mysql2 gem or the sqlite3 gem to provide the database drivers necessary for whichever database you choose to use. The instructions bellow assume you are working with SQLite3.

Running Rethoth

The Rethoth executable is still called thoth.

First, create a new Rethoth home directory. This is where your blog's config file and any customisations will live. If you use SQLite3, this directory will hold your database files as well.

$ thoth --create myblog
$ cd myblog

Now open up thoth.conf in your favourite editor and customise it to your liking (or you can leave it alone for now if you just want to get Thoth running quickly with all the default settings). There are lots of helpful comments to explain what all the different options are.

Create the Rethoth database by running:

$ thoth --migrate

Note: If you choose to use a server-based DBMS such as MySQL and MariaDB, you will have to create in your DBMS, the database, a Rethoth database user and her credentials before you can issue the thoth --migrate command.

When you're ready, start Rethoth by running:

$ thoth

If everything goes well, you should be able to access your new Rethoth blog at http://localhost:7000/ (or whatever port number you configured). That was easy, right?

Once you've tested everything and you're ready to run Rethoth in production, you'll want to start it as a daemon, like so:

$ thoth -d start

Getting the latest code

If you'd like to contribute to Rethoth or if you just want to run the very latest code, clone the git repository:

$ git clone git://github.com/pagojo/rethoth.git

Or, if you don't have git, you can just download the latest source as a tarball:

$ curl -L http://github.com/pagojo/rethoth/tarball/master -o pagojo-rethoth-master.tar.gz
$ tar xzvf pagojo-rethoth-master.tar.gz

To build and install a gem from the code you just pulled, change to the Rethoth source directory and run:

$ rake install

Running in development mode

You may experiment with Rethoth in development mode using the --dev switch.

When you use SQLite3 Rethoth uses by default the db/dev.db file, whereas for production mode it uses the db/live.db file (both found under your blog's home directory). In the case where you use a server-based DBMS you will have (as discussed above) to create the development database with the appropriate access control permissions yourself. When you do this, update the thoth.conf file and run thoth --dev to test.

Mad Props

The original Thoth logo was created by Arnaud Meuret.

Rethoth uses icons from the gorgeous Silk icon set by famfamfam, which is licensed under the Creative Commons Attribution 2.5 license.