Rails Engine - Gems dependencies, how to load them into the application?

后端 未结 7 1055
Happy的楠姐
Happy的楠姐 2020-11-30 01:23

I\'m doing an engine here, it works alright in stand alone.

When I transform it into a gem, and load it inside another application, I get a lot of undefined errors,

7条回答
  •  無奈伤痛
    2020-11-30 02:30

    from paperclip's README :

    For Non-Rails usage:

    class ModuleName < ActiveRecord::Base
      include Paperclip::Glue
      ...
    end
    

    I had the same issue and that fixed it for me.

提交回复
热议问题