-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uninitialized constant BSON::InvalidObjectId #14
Comments
Hi Judy, It's been a long while since we've updated this library, it's pretty likely that it isn't working with current versions of the Mongo Ruby driver and/or BSON lib, apologies. I'm not using rack-gridfs currently, so it might be awhile before I get the chance to test and try to update the library myself, it might be faster to give it a shot yourself, I'll happily review patches to bring it up-to-date. For sure we ought to start with at least updating the rack-gridfs gemspec to declare that we're not compatible with your version of whatever library (apparently Since you're using Mongoid, everything relevant is probably installed as a dependency of that and indented beneath it in your |
Some historical versions of the mongo gem had an open-ended ">=" dep on bson (e.g. https://rubygems.org/gems/mongo/versions/1.3.0), so users with one of these versions locked could end up getting incompatible mongo 1.x and bson 2.x installed together. References #14
Could you please try a |
I am currently using Rails 4 and edited the config/routes.rb as below:
But when I tried http://localhost:3000/admin/gridfs/54f5ece4e4b0e8f8dcce15d0, an error came up as "uninitialized constant BSON::InvalidObjectId". The same error came up when I tried http://localhost:3000/admin/gridfs. I got the id from the fs.files collection of the Mongodb.
Here is an example of an image in fs.files:
I am not sure what I have done wrong or what else I need to add in order for that to work.
Any help is appreciated and thank you very much!!! :)
The text was updated successfully, but these errors were encountered: