Rails Engines/ Railties


I come to you after lots of investigations concerning Rails Engines.
It appears (for a still young rails addict) that engines are not that
documented, unless they seem so powerful.

Of course, I read the sources given int his post:
and other recommended in other posts but written in something like

The most interesting resource I found is this great initiative:

It would be great to make it a common starting point.

But it appears to be a bit buggy now… :frowning: I tried without success to
dive into the code but without enough knowledge to get the problems.

Could anybody take a look at it? (the original author seems very busy
the latest weeks).
If ever you have an illustrated documentation for the dummy I admit to
be, I’ll of course try myself :slight_smile:

Thanks a lot,


What’s your use-case?
Theoretically you can stick a normal Rails (2.3.x) app under /vendor/
plugins and it will get picked up.
Probably the most important part (in my view) is to namespace your
plugin including the routes. E.g. we have a plugin which handles all
site related stuff like users, sections, menus, groups so it has:

  • app
    • controllers
      • site
        • groups
        • menus
        • sections
        • users

in your routes you’d have:

ActionController::Routing::Routes.draw do |map|
map.namespace(:site) do |site|
site.resources :groups
site.resources :menus
site.resources :sections
site.resources :users

If you start up your main app it will pick-up routes and classes from
your plugin and make it available within the main application.

Best, Daniel