We recently started doing this at my company, and we will never look back. Gems are great for using the same logic in multiple projects.
So, start with this railscast: Mountable Engines (I think this is the correct link, it is blocked here at work, so I can "Of course, if itβs not, just google" railscasts engine. ")
Also, check out the documentation here.
Here we started, and we instantly released our engine.
source share