mongo - ruby connection problem

后端 未结 6 1212
无人及你
无人及你 2020-12-24 03:17

I have installed mongo and bson_ext now I have created a .rb file with the following contents ::

require \'rubygems\'
require \'mongo\'

db = Mongo::Connecti         


        
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 03:51

    This is definitely due to your mongo server not running. Since you're on Ubuntu, try doing a sudo /etc/init.d/mongodb start and then see if your code works.

提交回复
热议问题