Capybara-webkit not finding CSS element + swrast error

I’ve read through a bunch of topics on this problem, but I can’t seem to solve this issue.

I’m trying to use capybara and capybara-webkit on my redhat server. When I manually test in a browser, my AJAX works fine. In my feature spec, the AJAX partial never shows up. I have confirmed this with capybara-webshot – the partial is just missing. I also get the following error:
libEGL warning: DRI2: failed to open swrast (search paths /usr/lib64/dri)

I have websearched my brains out and can’t seem to solve. Can anyone help? Relevant code below

the test:

 scenario "with valid data that finds results", js: true do
    fake_sign_in
    visit_whowas_path
    
    search_by_ip_and_port "192.168.1.1", "80", "2015-11-18 11:32:30"
    
    expect(page.find(".whowas-search-results-js").text).to have_content "johndoe1"
  end

the controller:

  def index
    @search ||= WhowasSearch.new 
    respond_to do |format|
      format.js
      format.html
    end    
  end
  
  def create
    @search = WhowasSearch.new(whowas_search_params)
    @search.search!
    render :index, search: @search
  end

the views

excerpt from index.html.haml

  .whowas-search-results
    #whowas-search-spinner
      = render "shared/spinner"
        
    #whowas-search-results-content.loading-content

index.js.haml

:plain
  $("#whowas-search-results-content").html("#{escape_javascript(render(partial: "results", locals: {search: @search}))}")

_results.html.haml

.whowas-search-results-js
  = search.username

Thanks so much! Jess