I am running genghisapp - the gem for Mongo management. When I run it it gives me a warning that the native BSON extension was not loaded and suggest I run gem install bson_ext
.
I have recently installed rbenv
and have my gems such as genghisapp
installed in ~/.gem
which is on my path and loads fine.
My first attempt was to run gem install bson_ext
but after restarting mongo/shell had no effect - the message is still there.
I then suspected this was not a genghisapp message but a Mongo one so thought I might need to install this as sudo. However this resulted in breaking my rbenv install due to permissions being now set to root/whatever because I was still using the local rbenv gem.
What is the proper way to solve this? Should I find the OSX gem and call its full path to install or do I need to specify something else?
The issue is because a) the version of mongo and bson_ext must match and b) there must not be any other bson_ext version installed.
The comments on this issue helped me solved the issue.
Run: gem list | grep -w 'bson\|bson_ext\|mongo'
which will print out all the versions. It should look like:
bson (1.9.2)
bson_ext (1.9.2)
mongo (1.9.2)
And not like:
bson (2.3.0, 1.10.2, 1.9.2)
bson_ext (1.10.2, 1.9.2)
mongo (1.10.2, 1.9.2)
If so, (de)install versions as necessary.