title: How to fix "Selenium::WebDriver::Error::WebDriverError: chrome not reachable" in WSL2
body: <p>I am trying to use WSL2 to rails application and had this error when RSpec is running:</p>
  
  <pre><code>Selenium::WebDriver::Error::WebDriverError:
                chrome not reachable
                  (Session info: headless chrome=77.0.3865.75)
  </code></pre>
  
  <p>Someone know to fix it?</p>
  
  <p>My capybara.rb:</p>
  
  <pre><code>require "capybara/rails"
  require "selenium-webdriver"
  
  Capybara.default_max_wait_time = 10
  Capybara.register_driver :chrome do |app|
    options = Selenium::WebDriver::Chrome::Options.new(
      args: %w[headless no-sandbox]
    )
    Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
  end
  
  Capybara.javascript_driver = :chrome
  Capybara.server = :puma, { Silent: true }
  </code></pre>
  
  <p>I put the path in env variables to reach my chromewebdriver binary, following this article "<a href="https://ngauthier.com/2017/09/rails-system-tests-with-headless-chrome-on-windows-bash-wsl.html" rel="nofollow noreferrer">https://ngauthier.com/2017/09/rails-system-tests-with-headless-chrome-on-windows-bash-wsl.html</a>" and nothing!</p>