This blog post was originally published a little while ago. Please consider that it may no longer be relevant or even accurate.
Occasionally I run into an issue where my RSpec system tests start to fail because they're unable to connect to the
It turns out that somehow a gem called
chromedriver-helper ends up getting installed from something else, and it has it's own executable called
chromedriver which RSpec ends up calling instead of the actual
chromedriver. You can verify this is the case by checking which executable is being called - I have my
chromedriver installed by Homebrew.
If the result for you references a gem instead, then you'll need to uninstall it.
This normally does the trick for me, but you might also need to get rbenv to rebuild it's links which only takes a second.
Now check the location of your
chromedriver and you should be good to go.