如何解决此错误:riak_client:RuntimeError:无法使用NetHTTP HTTP后端
我是 Riak 的新手,这是我在 irb 中尝试的 ruby 代码:
irb(main):002:0> c = Riak::Client.new
=> #<Riak::Client http://127.0.0.1:8098>
irb(main):003:0> obj = c['videos']['first']
RuntimeError: The NetHTTP HTTP backend cannot be used. Please check its requirements.
from /usr/local/lib/ruby/gems/1.9.1/gems/riak-client-0.9.8/lib/riak/client.rb:247:in `http'
from /usr/local/lib/ruby/gems/1.9.1/gems/riak-client-0.9.8/lib/riak/client.rb:276:in `backend'
from /usr/local/lib/ruby/gems/1.9.1/gems/riak-client-0.9.8/lib/riak/bucket.rb:102:in `get'
from (irb):3
from /usr/local/bin/irb:12:in `<main>'
我怎样才能解决这个问题?
谢谢,节日快乐!
I'm new to Riak , Here's the ruby code I tried in irb:
irb(main):002:0> c = Riak::Client.new
=> #<Riak::Client http://127.0.0.1:8098>
irb(main):003:0> obj = c['videos']['first']
RuntimeError: The NetHTTP HTTP backend cannot be used. Please check its requirements.
from /usr/local/lib/ruby/gems/1.9.1/gems/riak-client-0.9.8/lib/riak/client.rb:247:in `http'
from /usr/local/lib/ruby/gems/1.9.1/gems/riak-client-0.9.8/lib/riak/client.rb:276:in `backend'
from /usr/local/lib/ruby/gems/1.9.1/gems/riak-client-0.9.8/lib/riak/bucket.rb:102:in `get'
from (irb):3
from /usr/local/bin/irb:12:in `<main>'
How could I solve this problem?
Thanks, and Happy Holidays!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到此错误消息是因为我指定的端口号与 Riak 使用的端口号不同:
也许 Riak 正在为您运行在不同的端口上或者根本没有运行。为了解决这个问题,我刚刚删除了端口号:
I encountered this error message because I was specifying a port number different from the one Riak was using as such:
Maybe Riak is running on a different port for you or not running at all. To fix this, I just removed the port number:
错误消息清楚地表明它缺少要求。
您应该根据 文档 安装它们,或者尝试另一个后端。
The error message clearly says that it's missing the requirements.
You should install them according to documentation or maybe just try another backend.