gpt4 book ai didi

ruby - 无法找到或加载主类 net.lightbody.bmp.proxy.Main

转载 作者:数据小太阳 更新时间:2023-10-29 08:03:49 25 4
gpt4 key购买 nike

Github 链接:-

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/ruby-2.2.0@v-qa/gems/browsermob-proxy-0.2.0/lib/browsermob/proxy/server.rb:75:in `wait_for_startup'
from /home/ubuntu/.rvm/gems/ruby-2.2.0@v-qa/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>'

我该如何解决?

最佳答案

确保将带有“browsermob-dist”jar 文件的“lib”文件夹放在“bin”文件夹中。

关于ruby - 无法找到或加载主类 net.lightbody.bmp.proxy.Main,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28433120/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com