larkifly

初学者请教一个 ruby 使用 leveldb 的问题

  •  
  •   larkifly · Nov 29, 2016 · 6548 views
    This topic created in 3453 days ago, the information mentioned may be changed or developed.
    背景是:我目前接手别人的代码
    问题:当我在文件加上 require "leveldb" 就开始报错:

    .rvm/gems/ruby-2.3.0/gems/mongo-2.2.4/lib/mongo/protocol/message.rb:97:in `serialize': uninitialized constant BSON::ByteBuffer (NameError)

    当我去掉 require "leveldb",就正常了。
    请问这个问题怎么修复了?

    ps :我已经尝试在 Gemfile 里加 gem bson ,没有用
    1 replies    2016-11-30 05:18:27 +08:00
    msg7086
        1
    msg7086  
       Nov 30, 2016
    Did you mean: require 'bson'?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3365 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 12:38 · PVG 20:38 · LAX 05:38 · JFK 08:38
    ♥ Do have faith in what you're doing.