gpt4 book ai didi

riak - 如何解决此错误 : riak_client: RuntimeError: The NetHTTP HTTP backend cannot used

转载 作者:行者123 更新时间:2023-12-04 06:03:34 25 4
gpt4 key购买 nike

我是 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>'

我怎么能解决这个问题?

谢谢,节日快乐!

最佳答案

我遇到此错误消息是因为我指定的端口号与 Riak 使用的端口号不同:

client  = Riak::Client.new(:port => 8091, :http_backend => :Excon)

也许 Riak 正在为您在不同的端口上运行,或者根本没有运行。为了解决这个问题,我只是删除了端口号:
client = Riak::Client.new(:http_backend => :Excon)

关于riak - 如何解决此错误 : riak_client: RuntimeError: The NetHTTP HTTP backend cannot used,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8634674/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com