安装rails-4.0.0时出错

时间:2013-08-27 14:55:35

标签: ruby-on-rails ruby installation osx-mountain-lion

使用OS X 10.8.4ruby 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

看起来这只是用于文档,但是安装并没有错误仍然很好。

2 个答案:

答案 0 :(得分:21)

尝试更新rdoc,它可能只是旧的。

gem update rdoc

答案 1 :(得分:17)

不能告诉你那个错误来自哪里,但考虑到实际上安装ri和rdoc是多么无用,我只会这样做:

gem install rails --no-ri --no-rdoc

通过跳过文档,您还可以更快地安装。事实上,这是官方发布页面推荐的内容:http://weblog.rubyonrails.org/2013/6/25/Rails-4-0-final/