This gist contains all you need to setup capybara for selenium with headless chrome.
- Add these gems to the Gemfile under test group
gem 'capybara'
gem 'chromedriver-helper
gem 'selenium-webdriver'
- Copy the capybara.rb file into spec/support.
Make sure you have enabled this line in your rails_helper.rb
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
That's it.