読者です 読者をやめる 読者になる 読者になる

endokのブログ

IT・プログラミングネタ

Chefのdarkfish documentationでRDoc::Error

MacOSX 10.9.3 にて。

久々にgemを更新しようと、

$ gem update

したところ、

Installing darkfish documentation for chef-11.12.8
ERROR:  While executing gem ... (RDoc::Error)
    error generating /Users/endok/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/doc/chef-11.12.8/rdoc/lib/chef/streaming_cookbook_uploader_rb.html: Error while evaluating /Users/endok/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/rdoc/generator/template/darkfish/page.rhtml: undefined method `chomp' for nil:NilClass (RDoc::Error)

のエラー。

ググると、同じような問題を発見。
ruby - Error installing rails-4.0.0 - Stack Overflow

rdocを更新すればよいとのことなので、

$ gem update rdoc
Updating installed gems
Updating rdoc
Fetching: rdoc-4.1.1.gem (100%)
rdoc's executable "rdoc" conflicts with /Users/endok/.rbenv/versions/2.0.0-p353/bin/rdoc
Overwrite the executable? [yN]  y
rdoc's executable "ri" conflicts with /Users/endok/.rbenv/versions/2.0.0-p353/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.1.1
Parsing documentation for rdoc-4.1.1
Installing ri documentation for rdoc-4.1.1
Installing darkfish documentation for rdoc-4.1.1
Gems updated: rdoc

と無理やり上書きしてみる。

その後もう一度、

$ gem update

で更新成功。