ruby-on-rails - Ruby文档更新错误

标签 ruby-on-rails rubygems

我已经在MacPorts上安装了Ruby on Rails,从昨天开始,我一直在进行更新和修改,因为我想重新学习这种语言。

规范

ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-darwin10]
rails -v
Rails 3.0.3
gem -v
1.8.5

旅程

到目前为止,让Ruby,Rails和Gems在我的Mac上运行已经是一段漫长的旅程。在学习了教程之后,我决定安装/更新Rails API文档,并且遇到了这些错误:
Password:
NOTE: Gem::SourceIndex.from_installed_gems is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_installed_gems called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/commands/rdoc_command.rb:58.
NOTE: Gem::SourceIndex.installed_spec_directories is deprecated, use Specification.dirs. It will be removed on or after 2011-11-01.
Gem::SourceIndex.installed_spec_directories called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:47.
NOTE: Gem::SourceIndex.from_gems_in is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_gems_in called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:47.
NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#initialize called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:67.
NOTE: Gem::SourceIndex#spec_dirs= is deprecated, use Specification.dirs=. It will be removed on or after 2011-11-01.
Gem::SourceIndex#spec_dirs= called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:94.
NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#refresh! called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:95.
NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#load_gems_in called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:320.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/commands/rdoc_command.rb:58.
Installing ri documentation for activesupport-3.2.3...

unrecognized option `--encoding'

For help on options, try 'rdoc --help'

ERROR:  While generating documentation for activesupport-3.2.3
... MESSAGE:   exit
... RDOC args: --ri --op /opt/local/lib/ruby/gems/1.8/doc/activesupport-3.2.3/ri --encoding UTF-8 lib --title activesupport-3.2.3 Documentation --quiet

当我执行gem server时,服务器已启动。因此,我大概在一年前安装了文档,却完全忘记了。

我该怎么做才能摆脱所有这些错误?还是我可以安全地忽略它们并继续前进?

最佳答案

您可以放心地忽略这些错误。

现在,您可以通过指定gem install rails --no-ri --no-rdoc来安装gems来安装Rails,而不会出现这些错误。

将来,您可以添加:

gem: --no-ri --no-rdoc

~/.gemrc文件中,以全局忽略以后安装gem的文档。

另外,如果您刚刚开始使用,我建议您使用ruby版本管理器,例如rvmrbenv。当管理不同的 ruby 版本和 gem 集时,它使生活变得更加轻松。

关于ruby-on-rails - Ruby文档更新错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10568849/

相关文章:

ruby-on-rails - 多个关联的属性

ruby-on-rails - Rails counter_cache 未正确更新

ruby-on-rails - Trix 所见即所得编辑器更改文本字段的默认行/垂直高度

ruby-on-rails - 如何在 Ruby on Rails 中以编程方式查找命名空间/模块名称?

ruby - 确定您使用的是哪个 ruby​​gem

ruby-on-rails - 使用 ruby​​ on rails 安装 Susy 和 Compass

mysql - Ruby on Rails mysql2 gem 故障排除

ruby-on-rails - if/then/else/RETURN/end 的声明式 ruby​​ 编程替代?

ruby - 在 39 个总 gem 中找不到 'minitest' (>= 5.1)

用于雪豹的 mysql gem