Install chromedriver using a remote host

825 views Asked by At

I deployed my application using Ruby, Sinatra and Redis DataBase, on my ubuntu remote host named Scaleway.

In this way, i've install all what i need, and i can acces to my application. So when i want to use my script, who use Watir gem (selenium), it's always show me this error :

Selenium::WebDriver::Error::WebDriverError at /show_result unable to connect to chromedriver 127.0.0.1:9515

I know that i need Xvfb (who is installed), the headless gem (that i implemented in my code), and chromedriver that i installed by the same way that i installed it on my local machine. On my local machine, it works perfectly, but in my remote host, it show me this error above.

Did you know how to fix this problem ? How did you install Chromedriver so that my program recognizes it ?

1

There are 1 answers

4
mcbuddy On

Did you run the watir command using xvfb with something like this

xvfb-run <here is your command>

Also Chromedriver should place properly so it can be access anywhere, usually I put chromedriver at /usr/bin/ or /usr/sbin/