unable to convert "\xCF" from ASCII-8BIT to UTF-8

新しい環境にgemインストールしてたらこんなエラーが。

Parsing documentation for json-1.5.5
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/json/ext/generator/generator.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/json/ext/generator/generator.o, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/json/ext/json/ext/generator.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/json/ext/json/ext/parser.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/json/ext/parser/parser.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/json/ext/parser/parser.o, skipping
Installing ri documentation for json-1.5.5
...
Parsing documentation for net-ssh-2.1.4
unable to convert "\xE7" from ASCII-8BIT to UTF-8 for lib/net/ssh/authentication/pageant.rb, skipping

ココによるとrdocの問題らしい。

gem install rdoc
https://github.com/davidfstr/rdiscount/issues/96

Rubyはhomebrewでインストールしているので、brew updateして直らなかったら以下のようにアップデート。

rdocをアップデート

$ sudo gem install rdoc

Fetching: rdoc-4.0.1.gem (100%)
rdoc's executable "rdoc" conflicts with /usr/local/Cellar/ruby/2.0.0-p195/bin/rdoc
Overwrite the executable? [yN]  y
rdoc's executable "ri" conflicts with /usr/local/Cellar/ruby/2.0.0-p195/bin/ri
Overwrite the executable? [yN]  y
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Successfully installed rdoc-4.0.1
Parsing documentation for rdoc-4.0.1
Installing ri documentation for rdoc-4.0.1
1 gem installed

$ sudo gem list rdoc

*** LOCAL GEMS ***
rdoc (4.0.1, 4.0.0)

もう一回インストール


$ sudo gem install json

Fetching: json-1.8.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed json-1.8.0
Parsing documentation for json-1.8.0
Installing ri documentation for json-1.8.0
Done installing documentation for json after 0 seconds
1 gem installed

今度はエラーでなかった。ホッ。

コメント

人気の投稿