gpt4 book ai didi

ruby - 如何调试 gem 安装失败的原因?

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

我正在尝试安装 geoutm使用 gem install geoutm。 Github 存储库没有问题页面,所以我尝试自己解决问题然后提交拉取请求。这是问题:

$ gem install geoutmFetching: geoutm-1.0.1.gem (100%)Successfully installed geoutm-1.0.1ERROR:  While executing gem ... (TypeError)    no implicit conversion of Array into String

它说“已成功安装”,但尝试要求 gem 失败。详细安装并没有多大用处:

$ gem install geoutm --verboseHEAD https://rubygems.org/latest_specs.4.8.gz302 Moved TemporarilyHEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz200 OKGET https://rubygems.org/latest_specs.4.8.gz302 Moved TemporarilyGET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz200 OKInstalling gem geoutm-1.0.1/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/spec/latlon_spec.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/spec/geoutm_spec.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/spec/spec_helper.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/spec/utm_spec.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/spec/testdata.yaml/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/spec/spec.opts/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/spec/ellipsoid_spec.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/lib/geoutm/utm_zones.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/lib/geoutm/geo_utm_exception.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/lib/geoutm/utm.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/lib/geoutm/ellipsoid.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/lib/geoutm/latlon.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/lib/geoutm.rb/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/LICENCE/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/README.rdoc/home/tomas/.rvm/gems/ruby-2.0.0-p247/gems/geoutm-1.0.1/History.txtSuccessfully installed geoutm-1.0.1ERROR:  While executing gem ... (TypeError)    no implicit conversion of Array into String

该 gem 在手动下载且无需安装即可使用时完美运行。

问题是我不知道如何找出类型错误发生的位置。我找不到任何安装日志或更详细的输出标志。知道如何解决此错误吗?

最佳答案

使用来自

的输出
$ gem install --backtrace ...

你还可以做

$ byebug /home/tallakt/.rvm/rubies/ruby-2.0.0-p0/bin/gem install geoutm-1.0.1.gem

在 byebyg 内部类型:

(byebug) break /home/tallakt/.rvm/gems/ruby-2.0.0-p0/gems/rdoc-4.0.1/lib/rdoc/rubygems_hook.rb:171
Created breakpoint 1 at /home/tallakt/.rvm/gems/ruby-2.0.0-p0/gems/rdoc-4.0.1/lib/rdoc/rubygems_hook.rb:171
(byebug) c

我正在努力寻找 geoutm 中的错误,但现在可以使用

安装
$ gem install -N geoutm

跳过 RDoc 生成

关于ruby - 如何调试 gem 安装失败的原因?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19078183/

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