Ruby Docs Update Error

I have MacPorts installed Ruby on Rails, which I update and recycle from yesterday when I want to return to learning this language.

the functions

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

Journey

So far, it has been quite a journey to get Ruby, Rails, and Gems to work on my Mac. Following the tutorial, I decided to install / update the Rails API documents, and I ran into these errors :

 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 

when i made gem server , the server was started. Therefore, I probably installed the documents a year ago and completely forgot about it.

What can I do to get rid of all these errors? Or can I safely ignore them and continue?

+6
source share
3 answers

You can safely ignore these errors.

Now you can install gems by specifying gem install rails --no-ri --no-rdoc to install Rails without these errors.

And in the future you can add:

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

into your ~/.gemrc file to globally ignore documentation for future gem installations.

Also, if you are just starting out, I would recommend using a ruby ​​version manager like rvm or rbenv . This makes life easier when managing different versions of rubies and gemsets.

+8
source

Try gem install rdoc or gem update rdoc if you have rdoc version <3.0.

RDoc creates documentation from Ruby source files. So, as @Mark Sands writes, it is not necessary for your code to work, it may be nice to have and address the root of your mistakes.

+5
source

I get the same warnings here on Debian linux and I use rvm with ruby-1.9.3-p194 .

I excluded most of them by changing line 127

 ~/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb 

127 add_spec gemspec if gemspec to 127 Gem::Specification.add_spec gemspec if gemspec

As for the rest, they say that they are out of date without replacement.

I found this thread because I'm trying to learn more about it. Does anyone think there is an update? The warnings indicate that they will be deleted after or after 2011-11-01 . The time has come and gone.

+3
source

Source: https://habr.com/ru/post/915585/


All Articles