td-agent2显示警告:警告:Gem :: Specification.reset期间未解析的规范:json(> = 1.4.3)

时间:2015-05-26 16:55:38

标签: fluentd treasure-data

td-agent2在下面显示警告:

# sudo /opt/td-agent/embedded/bin/fluent-gem list
WARN: Unresolved specs during Gem::Specification.reset:
      json (>= 1.4.3)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
(snip)

我尝试通过sudo /opt/td-agent/embedded/bin/fluent-gem cleanup解决此问题,但此命令无法修复警告。

这没问题吗?

# td-agent --version
td-agent 0.12.7

# apt-cache show td-agent
Package: td-agent
Status: install ok installed
Priority: extra
Section: misc
Installed-Size: 207309
Maintainer: Treasure Data, Inc
Architecture: amd64
Version: 2.2.0-0
Description: Treasure Agent: A data collector for Treasure Data
Description-md5: 9a8c3c5185974525f7e38d7f37f5d597
License: unknown
Vendor: Omnibus <omnibus@getchef.com>
Homepage: http://treasuredata.com

# sudo /opt/td-agent/embedded/bin/fluent-gem --version
WARN: Unresolved specs during Gem::Specification.reset:
      json (>= 1.4.3)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
2.2.1

# Ubuntu 14.04

https://gist.github.com/sanemat/09e5d995d9c607054dad

1 个答案:

答案 0 :(得分:0)

问题

json 似乎存在冲突的宝石版

WARN: Unresolved specs during Gem::Specification.reset:
      json (>= 1.4.3)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.

使用Bundler

解决问题

如果您使用Bundler,您应该会看到此问题消失。

使用gem cleanupRubyGems

解决问题

否则,请尝试gem cleanup(通常无法正常工作):

$ gem cleanup json
Cleaning up installed gems...
Clean Up Complete

使用gem uninstallRubyGems

解决问题

或尝试卸载一些您不再使用它的json宝石:

$ gem uninstall json

Select gem to uninstall:
 1. json-1.4.3
 2. json-1.8.2
 3. json-1.8.3
 4. All versions
> 1
Successfully uninstalled json-1.4.3