Appium Ruby 控制台 (ARC) 抱怨 HTTP 请求路径为空 (ArgumentError)

Appium Ruby Console (ARC) complains HTTP request path is empty (ArgumentError)

我是 appium 的初学者,甚至是 node.js 或 ruby 语言的初学者。所以我在安装appium的时候是完全按照教程来的。当我运行命令 arc 时,出现错误:

/Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/2.1.0/net/http/generic_request.rb:27:in `initialize': HTTP request path is empty (ArgumentError)
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/2.1.0/net/http/request.rb:14:in `initialize'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:71:in `new'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:71:in `new_request_for'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:35:in `request'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:64:in `request'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_lib-5.0.0/lib/appium_lib/common/patch.rb:118:in `raw_execute'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:101:in `create_session'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:33:in `new'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:33:in `for'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver.rb:67:in `for'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_lib-5.0.0/lib/appium_lib/driver.rb:477:in `start_driver'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/lib/start.rb:16:in `<top (required)>'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:96:in `block in load_requires'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:95:in `each'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:95:in `load_requires'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:117:in `initial_session_setup'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/pry_class.rb:142:in `start'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:201:in `block in <top (required)>'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `call'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `block in parse_options'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `each'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `parse_options'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/lib/appium_console.rb:49:in `<module:Console>'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/lib/appium_console.rb:31:in `<module:Appium>'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/lib/appium_console.rb:30:in `<top (required)>'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/kenmux/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/appium_console-1.0.3/bin/arc:66:in `<top (required)>'
    from /Users/kenmux/.rbenv/versions/2.1.5/bin/arc:23:in `load'
    from /Users/kenmux/.rbenv/versions/2.1.5/bin/arc:23:in `<main>'

那我该怎么办?我错过了什么吗?我无法克服它!

我在工作时遇到了同样的问题,我的 .bash_profile

中有一个代理服务器

打开终端并输入:

cat ~/.bash_profile

这将显示您的个人资料中的内容。

我的 .bash_profile 有以下内容。

export http_proxy="http://127.0.0.1:8888"
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy

要将它们注释掉,只需在每行前面添加#。然后重新启动终端会话。

旁注:

当您从终端输入 user$ arc 时,您需要确保您的 appium 运行 和 appium.txt 文件位于 运行 arc 所在的同一目录中.

这里有很多好东西 -> Ruby_Console

希望对您或其他人有所帮助。