Github上链接: -无法找到或加载主类net.lightbody.bmp.proxy.Main
https://github.com/jarib/browsermob-proxy-rb
正在创建使用browsermob代理按照代理: - 执行
require 'selenium/webdriver'
require 'browsermob/proxy'
server = BrowserMob::Proxy::Server.new("/path/to/downloads/browsermob-proxy/bin/browsermob-proxy") #=> #<BrowserMob::Proxy::Server:0x000001022c6ea8 ...>
server.start
“server.start”,它会抛出如下错误: -
Error: Could not find or load main class net.lightbody.bmp.proxy.Main
BrowserMob::Proxy::Server::ServerDiedError: unable to launch the server (rerun with :log => true to see process output)
from /home/ubuntu/.rvm/gems/[email protected]/gems/browsermob-proxy-0.2.0/lib/browsermob/proxy/server.rb:75:in `wait_for_startup'
from /home/ubuntu/.rvm/gems/[email protected]/gems/browsermob-proxy-0.2.0/lib/browsermob/proxy/server.rb:34:in `start'
from (irb):13
from /home/ubuntu/.rvm/rubies/ruby-2.2.0/bin/irb:11:in `<main>'
我该如何解决这个问题?