I'm trying to run Elasticsearch on Heorku with the Bonsai add on but I keep getting the following error:
Faraday::ConnectionFailed (Connection refused - connect(2)):
and then this sometimes too
Completed 500 Internal Server Error in 131ms (Searchkick: 5.7ms | ActiveRecord: 11.1ms)
Faraday::ConnectionFailed (Connection refused - connect(2)):
I've heard this is because it can't find the Bonsai URL but I believe i initiated that with /config/initializer/bonsai.rb
Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['BONSAI_URL']
Any ideas? Basically the whole app has stopped working. It runs fine locally this is just on production.
I also have gem 'bonsai-elasticsearch-rails', '~> 0.0.4'
installed but still not working.
I also went and re built the index, according to this and still the same error
rs191919:~/workspace/sample_app (bonsai-more-more) $ curl -XPOST [MYURL]/pallet-index
{"acknowledged":true}
rs191919:~/workspace/sample_app (bonsai-more-more) $ curl -XPOST [MYURL]/hello -d '{"title":"Hello world"}'
{"_index":"pallet-index","_type":"test","_id":"hello","_version":1,"created":true}
rs191919:~/workspace/sample_app (bonsai-more-more) $ curl -XGET '[MYURL]/pallet-index/te
{"_index":"pallet-index","_type":"test","_id":"hello","_version":1,"found":true,"_source":{"title":"Hello world"}}