之前项目中用的是 1.12.3 版本的 mongo gem,后来升级 mongo gem 后发现之前版本的链接方式都换了,想再退回到 1.12.3 版本的 GEM 但使用副本集的时候
client =MongoReplicaSetClient.new(['123.57.xxx.xxx:30000', '123.56.xxx.xxx:30000', '101.201.xxx.xxx:30000'])
链接时报
NameError: uninitialized constant MongoReplicaSetClient
from (irb):3
from /home/haonan/.rvm/gems/ruby-2.1.4/gems/railties-4.2.3/lib/rails/commands/console.rb:110:in `start'
from /home/haonan/.rvm/gems/ruby-2.1.4/gems/railties-4.2.3/lib/rails/commands/console.rb:9:in `start'
from /home/haonan/.rvm/gems/ruby-2.1.4/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:68:in `console'
from /home/haonan/.rvm/gems/ruby-2.1.4/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/haonan/.rvm/gems/ruby-2.1.4/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
网上各种查,没找到好的办法,请假大家了