Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


remove gridfs dependency #94

arthurnn opened this Issue · 7 comments

2 participants


Can we make gridfs dependency optional. I guess for a lot of use cases dont need that extra dependency.


Making the dependency optional opens up extra configuration for a common use case. It also removes the ability to have automatic version dependency resolution through rubygems/bundler.

The mongoid-grid_fs gem is 13KB. That's probably smaller than most of the images in most web apps. Is there a strong technical reason to lazy require this dependency, or is this request mostly driven by purism?


I guess thats true, there is no main technical reason for it, it is only for the sake of not to have an extra dependency. But you got a fair point, on extra config.


@arthurnn arthurnn closed this

One particular reason for this would be to upgrade to mongoid 4.. current I have to change/upgrade the required version of mongoid in 2 gems, mongoid-grid_fs and carrierwave-mongoid.


fell free to cherry-pick my commits if you want to make grid-fs not mandatory, and make carrierwave suport mongoid 4 ..


@arthurnn I just relaxed dependencies in both carrierwave-mongoid and mongoid-grid_fs (master branches) to allow for mongoid 4.

You should be able to point at both in your Gemfile now. Let me know how it goes.


@rmm5t works fine.. thanks. only issue is that in my gemfile I still need to specify

gem "mongoid-grid_fs", github: "ahoward/mongoid-grid_fs"

even if I am not using it. :cry:


works fine.. thanks

Great. You're welcome.

even if I am not using it.

Sorry, but that's the price you'll have to pay for running against master on 4 projects at once :wink:

@aCandidMind aCandidMind referenced this issue from a commit in beanangel/beanangel_backend
@aCandidMind aCandidMind ~bundle: Updating carrierwave-mongoid to 0.6.3. Previously it was on
0.1.0 only because its dependency mongoid-grid_fs (dependent on even
if you're not using GridFS, see
doesn't have a release with mongoid 4 support. 0.1.0 didn't have hard
version restrictions that's why this was bundled in the first place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.