elasticsearch-ruby
elasticsearch-ruby copied to clipboard
Test Cluster incompatible with windows
There are currently a few issues with the elasticsearch-extensions and Windows compatibility:
- #503 patron gem
- path can't be determined
/dev/nulldoes not exist on windows- shutdown
getpgiddoes not exist on windows,KILLdoes not work.
The workarounds are as follows:
- clone and remove the
patrondev dependency - pass in
command: <path to elasticsearch>to#start#stopand#running? - turn on
ENV['DEBUG']or replace/dev/nullwithNUL:on windows (e.g.RUBY_PLATFORM =~ /mswin/orGem.win_platform?) - rescue and ignore (it's shut down), manually do a
taskkill.
They are basically one-liners to fix, and I would propose a bit of documentation, but otherwise the gem works as expected 👍
@SleeplessByte, many thanks for the report, this is useful!
The extension is naturally brittle, given all the variability across operating systems, ES versions, Ruby versions, ... despite it's popularity.
For a long time, I would like to refactor it to use Docker as the runner, since Elastic provides Docker images from version 5.x upwards. This should mitigate many problems, with the only downside that a Docker-based runner wouldn't work for lower versions.