1

我想在我的 Raspberry Pi 上运行一个 ruby​​ 脚本。我已经通过 rvm 安装了 ruby​​。我确定,我使用的是正确的版本:

$ rvm current
ruby-1.9.3-p194

当我运行我的脚本时,我得到以下信息:

./test.rb 
/home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/port_prober.rb:25:in `initialize': Address family not supported by protocol - socket(2) (Errno::EAFNOSUPPORT)
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/port_prober.rb:25:in `new'
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/port_prober.rb:25:in `block in free?'
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/port_prober.rb:23:in `each'
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/port_prober.rb:23:in `free?'
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/port_prober.rb:5:in `above'
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/chrome/service.rb:33:in `default_service'
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/chrome/bridge.rb:14:in `initialize'
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/driver.rb:37:in `new'
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/driver.rb:37:in `for'
from /home/pi/.rvm/gems/ruby-1.9.3-p194/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver.rb:65:in `for'
from ./test.rb:82:in `block in <main>'
from ./test.rb:54:in `each'
from ./test.rb:54:in `<main>'

任何想法,有什么问题?我试过重新启动,这并不能解决问题...

4

0 回答 0