Could not find phantomjs

后端 未结 6 1673
终归单人心
终归单人心 2021-01-01 09:57

Getting the following error when trying to use phantomjs from ruby on Ubuntu:

 Failure/Error: visit root_path
 Cliver::Dependency::NotFound:
   Could not fin         


        
6条回答
  •  礼貌的吻别
    2021-01-01 10:34

    add to Gemfile

    gem 'phantomjs', :require => 'phantomjs/poltergeist'
    

    or put code below to spec_helper.rb

    require 'phantomjs' 
    Capybara.register_driver :poltergeist do |app|
        Capybara::Poltergeist::Driver.new(app, :phantomjs => Phantomjs.path)
    end
    

    https://github.com/colszowka/phantomjs-gem

提交回复
热议问题