rha*_*and 6 rubygems ruby-on-rails
我有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
Run Code Online (Sandbox Code Playgroud)
旅程
到目前为止,使用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
Run Code Online (Sandbox Code Playgroud)
我什么时候gem server服务器启动了.所以我可能在一年前安装了docs并完全忘了它.
我该怎么做才能摆脱所有这些错误?或者我可以安全地忽略它们并继续前进吗?
您可以放心地忽略这些错误.
现在,您可以通过指定gem install rails --no-ri --no-rdoc安装Rails而不会出现这些错误来安装gem .
在将来,您可以添加:
gem: --no-ri --no-rdoc
Run Code Online (Sandbox Code Playgroud)
到您的~/.gemrc文件,全局忽略未来gem安装的文档.
此外,如果您刚刚开始,我建议使用ruby版本管理器,如rvm或rbenv.在管理不同的ruby版本和gemsets时,它使生活变得如此简单.
尝试gem install rdoc或者 gem update rdoc如果你有rdoc版本<3.0.
RDoc从Ruby Source Files生成文档.因此,正如@Mark Sands所说,使代码运行并不是绝对必要的,因此可以很好地解决错误的根源.
| 归档时间: |
|
| 查看次数: |
3908 次 |
| 最近记录: |