synchronizing updates when reusing rails apps

I am looking to reuse elements of a rails app in other rails apps but am
concerned about how to keep them up to date as I add new

Essentially, I have a template of functionalities and features that I
want to apply to different market segments. Over time I will be adding
in common functionalities that I want all to use. In doing so, I want
to minimize errors/manual editing when I push out upgrades to different

1. I am aware of engines and lightrail? Are either of these the right
way to go?

2. I was thinking of building one master rails app and then creating a
script that generates each specific app, inserting the appropriate
app specific content (db names, slogans, images, etc). Does this sound
like a reasonable approach?

Is there any other plugin/gem/technique available that I should be
looking at?

Thank you,