how can i connect to a mongodb from Ruby code?

前端 未结 3 2121
说谎
说谎 2021-02-08 21:41

how can i connect to a mongodb from Ruby code ?

3条回答
  •  鱼传尺愫
    2021-02-08 22:27

    • http://www.mongodb.org/display/DOCS/Ruby+Language+Center
    • http://api.mongodb.org/ruby/current/file.TUTORIAL.html

    Short version: install the Mongo gem, then db = Mongo::Connection.new.db("mydb")

提交回复
热议问题