How do I extract Rails view helpers into a gem?

In my opinion, a full Engine is overkill for this task. You could instead just create a Railtie which includes your helpers into ActionView::Base when it initializes. # lib/my_gem/view_helpers.rb module MyGem module ViewHelpers def pre(text) content_tag :pre, text end def another_helper # super secret stuff end end end # lib/my_gem/railtie.rb require ‘my_gem/view_helpers’ module MyGem class … Read more