views:

31

answers:

2

Basically, I would like to write a rails 3 app that

  • is embeddable in other rails 3 apps (basically some routes, a controller, and some views, no persisting models)
  • works standalone
  • can be bundled up into a gem and be launched from a command (this one is more a nice to have)

From what I have read, rails engines would totally solve my problem. The vast majority of what you get when you google it is either people complaining about a lack of documentation, or someone building a plugin, not really a pluggable app. Could anyone point me to better documentation/screencasts (even books if nessicary)

Thanks a bunch

+1  A: 

An Engine is really what you need and totally designed to meet your reuirements.

Engines actually work a lot better in Rails3.

A lot of the complaints from previous versions of Rails have been resolved in the latest version. I have used engines quite extensively in Rails 2.x and not found them to be all that bad to be honest.

Toby Hede
Thanks Toby :) Could you point me in the direction of any good documentation on how to do it? or at least where to start?
Matt Briggs
A: 

Matt, I'm working on a rails forum engine and I had to figure a lot of this out so I extracted the foundation into a detailed example that covers a lot of common needs. It's generalized so you can easily adapt it. I don't have detailed documentation yet but I link to the sources that I used to figure this out, and I'm happy to answer questions about my source. Check it out:

http://keithschacht.com/creating-a-rails-3-engine-plugin-gem/

Keith Schacht