Dependency on ActiveRecord #919

stepantubanov opened this Issue Jun 16, 2012 · 4 comments


None yet

2 participants



We're using Paperclip with Mongoid. Tried to update our gems today and got

.../gems/paperclip-3.1.0/lib/paperclip/schema.rb:12:in `included': uninitialized constant Paperclip::Schema::ActiveRecord (NameError)
        from .../gems/paperclip-3.1.0/lib/paperclip/glue.rb:11:in `include'
        from .../gems/paperclip-3.1.0/lib/paperclip/glue.rb:11:in `included'
        from .../gems/mongoid-paperclip-03f641825fe0/lib/mongoid_paperclip.rb:78:in `include'
        from .../gems/mongoid-paperclip-03f641825fe0/lib/mongoid_paperclip.rb:78:in `has_mongoid_attached_file'


I noticed that these ActiveRecord references were introduced in 90ea9da.


sikachu commented Jun 16, 2012

Oh snap, 3.1.1 will follow up soon.


@sikachu Thank you 👍

@sikachu sikachu added a commit that closed this issue Jun 16, 2012
@sikachu sikachu Require Paperclip::Schema only when used with AR
This will solve an issue when using Paperclip without Active Record
such as Mongoid.

Fixes #919
@sikachu sikachu closed this in 2860c70 Jun 16, 2012
sikachu commented Jun 16, 2012

Please try 3.1.1 and see if it fixes your issue.


It does! Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment