I have a project that is using CicleCI for testing, and I'm trying to integrate Tire for a search functionality. Locally, all the tests run fine with no issue. However, when CircleCI runs the test, I'm getting a Errno::ECONNREFUSED : Connection refused - connect(2)
error. I've tried adding a tire.rb
file to config/initilizers:
if Rails.env.test?
ENV['ELASTICSEARCH_URL'] = "http://circlehost:9200" # With and without this.
Tire.configure do
url "http://circlehost:9200" # also tried localhost:9200, and 127.0.0.1:9200
end
end
Tried adding a circle.yml
file as seen here: https://circleci.com/docs/config-sample
hosts:
circlehost: 127.0.0.1
And any combination of those. Now I'm out of ideas, and have no idea what to do. I thought I was on the right path, but now I'm not so sure.
If anyone could help, it would be greatly appreciated.