elasticsearch - Rails, Tire, and CircleCI: Getting a Errno::ECONNREFUSED error when running rspec tests when creating Tire-Searchable objects -
i have project using cicleci testing, , i'm trying integrate tire search functionality. locally, tests run fine no issue. however, when circleci runs test, i'm getting errno::econnrefused : connection refused - connect(2)
error. i've tried adding tire.rb
file config/initilizers:
if rails.env.test? env['elasticsearch_url'] = "http://circlehost:9200" # , without this. tire.configure url "http://circlehost:9200" # tried localhost:9200, , 127.0.0.1:9200 end end
tried adding circle.yml
file seen here: https://circleci.com/docs/config-sample
hosts: circlehost: 127.0.0.1
and combination of those. i'm out of ideas, , have no idea do. thought on right path, i'm not sure.
if help, appreciated.
since elasticsearch available on local machine, test cases run fine. on circleci need specify explicitly elasticsearch needed. hence, need add 'elasticsearch' under services in circle.yml.
in circle.yml
machine: services: - elasticsearch
checkout https://circleci.com/docs/configuration#services more information.
Comments
Post a Comment