Dependency on ActiveRecord #919

Closed
stepantubanov opened this Issue Jun 16, 2012 · 4 comments

Projects

None yet

2 participants

@stepantubanov

Hi,

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.

Thanks.

@sikachu
Contributor
sikachu commented Jun 16, 2012

Oh snap, 3.1.1 will follow up soon.

@stepantubanov

@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
2860c70
@sikachu sikachu closed this in 2860c70 Jun 16, 2012
@sikachu
Contributor
sikachu commented Jun 16, 2012

Please try 3.1.1 and see if it fixes your issue.

@stepantubanov

It does! Thanks a lot

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