使用OS X 10.8.4和
ruby 1.9.3p194
$gem install rails Successfully installed rails-4.0.0 1 gem installed Installing ri documentation for rails-4.0.0... Installing RDoc documentation for rails-4.0.0... ERROR: While generating documentation for rails-4.0.0 ... MESSAGE: error generating /Users/michaelirey/.rvm/gems/ruby-1.9.3-p194/doc/rails-4.0.0/rdoc/guides/Rakefile.html: Error while evaluating /Users/michaelirey/.rvm/gems/ruby-1.9.3-p194/gems/rdoc-3.12.2/lib/rdoc/generator/template/darkfish/page.rhtml: undefined method `chomp' for nil:NilClass (RDoc::Error) ... RDOC args: --op /Users/michaelirey/.rvm/gems/ruby-1.9.3-p194/doc/rails-4.0.0/rdoc lib --title rails-4.0.0 Documentation --quiet
看起来这只是为了文档,但它仍然是很好的安装没有错误.
解决方法
尝试更新rdoc,它可能只是旧的.
gem update rdoc