Custom Blog Engines for Ruby on Rails

    Sometimes it seems to me that there is a damn place in the Ruby on Rails ecosystem: embedded blogging engines. It's especially nice to watch in the light of the endless number of “Rails Blog in 10 Minutes” screencasts.

    Apparently, any attempt to create a blogging solution in the form of a plug-in leads, as a rule, to one of two outcomes: either the person gets tired of this work and he leaves to do more urgent things, or the engine turns into a monster that can gobble up any Rails application before its initialization.

    Some time ago, when I worked at ABAK-PRESS, management ordered me to add to the cute websiteuser blogs are very fashionable nowadays (this functionality is currently under active development). Least of all we wanted to reinvent the wheel and make obvious cars from controllers with models, but after a little reconnaissance we had to put up with it and do everything ourselves. Why?

    Because we did not find a suitable solution, alas. The main restrictions were imposed by the statement of the problem and the features of the code base of our portal:
    • it is necessary to track all slug changes in blog entries and not to allow “broken” links when editing metadata;
    • we have a very sophisticated heading system that should be tied to blog posts;
    • a number of modifications in the routing system complicates the implementation of plug-ins with their own routes;
    • implemented a no less cunning system of regions, which is very closely integrated with the routes and characteristics of the posts.
    The world is small. One of the most significant existing solutions will probably come in handy for someone, and this article will help reduce the cost of reconnaissance.

    Description of analogues


    Governor is a plugin for Ruby on Rails 3.0, which allows you to almost seamlessly incorporate blogging functionality into your Web application.

    The plugin is fully covered by tests using RSpec and has a minimum of run-time dependencies: only ActiveRecord and will_paginate. User authentication and authorization methods are specified by overriding the corresponding helpers.

    It is a bit annoying that the last commit to it was dated November 27 of last year, and support for Rails 3.1 has not yet been announced.


    In the Ruby on Rails ecosystem, “harvesters” like Locomotive , which can be embedded in a web application in a completely trivial way (like an engine ) and used to build custom blogs , are of some popularity .

    The question arises of the appropriateness of embedding such solutions: these CMS can do too much. The functionality implemented in them can, at best, duplicate existing developments and sometimes spoil the architectural idyll. Not every person is ready to put up with this.

    The popularity of these solutions affects both the pace of development of projects and the quality of code coverage with tests. Do not forget that Locomotive uses only MongoDB, which may not suit everyone.


    There is also a more modern analogue of the Governor engine - Kublog .

    Kublog is very similar to Governor in its essence, but it is sharpened by slightly more “modern” tools: Ruby on Rails ≥ 3.1 and carrierware (an analogue of paperclip).

    Judging by the fact that the last commit was dated November 21, 2011, and only by the partial availability of tests for the code, the hypothesis arises that there is a certain relationship between the number of blog plugins for Rails and the time of year.

    Despite the low development intensity and almost no interest in the project from the community, it is used by the development company in production and, probably, shows very good results.


    The JABE embedded engine appeared relatively recently and already now has a number of dependencies comparable to a good CMS: Rails ≥ 3.1, ActiveRecord, kaminari, devise, simple_form, and so on.

    Coverage with tests is absent as a fact, despite the very impressive version 0.7.0, to which the engine has been able to grow since last December.

    Summary table

    AnalogueLightnessPopularityLimitationsTest coverage
    GovernorYes83 watchers, 5 forks, last commit at 11/27/2011Activerecordgood
    Locomotivenot947 watchers, 218 forks, last commit at 02/09/2012mongoidgood
    KublogYes3 watchers, 1 fork, last commit at 11/21/2011Activerecordaverage
    JabeYes14 watchers, 3 forks, last commit at 02/02/2012Activerecordnot
    Thus, I want to ask a rhetorical question: is the original task so irrelevant for the Ruby on Rails community that no one is publicly trying to solve it?

    I dare to assume that the task, although relevant, is always in the development of the blog engine with clarifying requirements, which is why the solution for (custom) blogs on rails in general is Sisyphus labor.

    Also popular now: