我该如何调试gem安装失败的原因? [英] How do I debug why a gem install fails?

查看:109
本文介绍了我该如何调试gem安装失败的原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用 gem install geoutm geoutm C $ C>。 Github存储库没有问题页面,所以我试图自己解决这个问题,然后提交一个请求。这是问题:

 $ gem install geoutm 
获取:geoutm-1.0.1.gem(100%)
成功安装geoutm-1.0.1
错误:在执行gem时(TypeError)
没有将数组隐式转换为字符串

它说成功安装,但试图要求创业板失败。详细安装并没有多大用处:

 $ gem install geoutm --verbose 
HEAD https://rubygems.org/latest_specs.4.8 .gz
302暂时移动
HEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
OK
GET https: //rubygems.org/latest_specs.4.8.gz
302暂时移动
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
安装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 / LICENSE
/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.txt
成功安装geoutm-1.0.1
错误:执行gem时... (TypeError)
没有将数组隐式转换为字符串

当手动下载并在没有安装的情况下使用时,gem完美地工作。
$ b

问题是我不知道如何确定类型错误发生在哪里。我无法找到任何安装日志或更详细的输出标志。任何想法如何我可以找出这个错误?

解决方案

使用从输出

  $ 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 
在/home/tallakt/.rvm/gems/ruby-2.0.0-p0/gems/rdoc-4.0.1/lib/rdoc/rubygems_hook.rb:171 $创建断点1 b $ b(byebug)c

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

  $ gem install -N geoutm 

跳过了RDoc生成


I'm trying to install geoutm using gem install geoutm. The Github repository doesn't have an issues page, so I'm trying to fix the issue myself then submit a pull request. This is the issue:

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

It says "successfully installed", but trying to require the gem fails. Verbose install isn't much more useful:

$ gem install geoutm --verbose
HEAD https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
HEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
GET https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
Installing 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.txt
Successfully installed geoutm-1.0.1
ERROR:  While executing gem ... (TypeError)
    no implicit conversion of Array into String

The gem works flawlessly when downloaded manually and used without installation.

The issue is that I don't know how to figure out where the type error occurs. I can't find any install logs or more verbose output flags. Any idea how I can figure out this error?

解决方案

Using the output from

$ gem install --backtrace ...

you can further do

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

Inside byebyg type:

(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

I am working on finding the bug in geoutm, but for now installation is possible using the

$ gem install -N geoutm

that skips RDoc generation

这篇关于我该如何调试gem安装失败的原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆