我正在尝试在 c9.io 上设置 searchkick。我已经安装了 elasticsearch,但是我无法访问 localhost 或我的 URL,这是 c9.io 在端口 9200 上提供给我的,以验证 searchkick 是否正常工作。有没有人遇到过这个问题?
我已经验证弹性搜索正在工作。
$ /home/ubuntu/.linuxbrew/bin/brew info elasticsearch
elasticsearch: stable 1.7.1, HEAD
Distributed real-time search & analytics engine for the cloud
https://www.elastic.co/products/elasticsearch
/home/ubuntu/.linuxbrew/Cellar/elasticsearch/1.7.1 (33 files, 30M) *
Built from source
From: https://github.com//homebrew/blob/master/Library/Formula/elasticsearch.rb
==> Caveats
Data: /home/ubuntu/.linuxbrew/var/elasticsearch/elasticsearch_ubuntu/
Logs: /home/ubuntu/.linuxbrew/var/log/elasticsearch/elasticsearch_ubuntu.log
Plugins: /home/ubuntu/.linuxbrew/var/lib/elasticsearch/plugins/
Config: /home/ubuntu/.linuxbrew/etc/elasticsearch/
当我运行 rake 时,这是我收到的错误消息。
$rake searchkick:reindex CLASS=Account
rake aborted!
Faraday::ConnectionFailed: Connection refused - connect(2) for "localhost" port 9200
/usr/local/rvm/gems/ruby-2.1.5@rails4/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:80:in `perform_request'
/usr/local/rvm/gems/ruby-2.1.5@rails4/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:40:in `block in call'
/usr/local/rvm/gems/ruby-2.1.5@rails4/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
/usr/local/rvm/gems/ruby-2.1.5@rails4/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:32:in `call'
/usr/local/rvm/gems/ruby-2.1.5@rails4/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in `build_response'
/usr/local/rvm/gems/ruby-2.1.5@rails4/gems/faraday-0.9.1/lib/faraday/connection.rb:377:in `run_request'
ect...
我在想如果我找不到解决这个问题的方法,我会建立一个本地环境,但我真的不想这样做。