Created
January 9, 2013 00:08
-
-
Save anonymous/4489300 to your computer and use it in GitHub Desktop.
ruby mongodb driver 1.8.1 not connecting (legacy connection) to db on Debian GNU/Linux (1.8.0 and 1.7.x could)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mongo' | |
con = Mongo::Connection.new('127.0.0.1', 27017) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
#gem 'mongo', '1.7.1' | |
#gem 'mongo', '1.8.0' | |
gem 'mongo', '1.8.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmettraux@tachibana ~/tmp/mongo 立 bundle exec ruby code.rb | |
** Notice: The native BSON extension was not loaded. ** | |
For optimal performance, use of the BSON extension is recommended. | |
To enable the extension make sure ENV['BSON_EXT_DISABLED'] is not set | |
and run the following command: | |
gem install bson_ext | |
If you continue to receive this message after installing, make sure that | |
the bson_ext gem is in your load path. | |
/home/jmettraux/.rvm/gems/ruby-1.9.3-p194/gems/mongo-1.8.1/lib/mongo/mongo_client.rb:479:in `connect': Failed to connect to a master node at 127.0.0.1:27017 (Mongo::ConnectionFailure) | |
from /home/jmettraux/.rvm/gems/ruby-1.9.3-p194/gems/mongo-1.8.1/lib/mongo/mongo_client.rb:631:in `setup' | |
from /home/jmettraux/.rvm/gems/ruby-1.9.3-p194/gems/mongo-1.8.1/lib/mongo/mongo_client.rb:147:in `initialize' | |
from /home/jmettraux/.rvm/gems/ruby-1.9.3-p194/gems/mongo-1.8.1/lib/mongo/legacy.rb:56:in `initialize' | |
from code.rb:3:in `new' | |
from code.rb:3:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment