Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby Docs Update Error

I have MacPorts installed Ruby on Rails which I am have been updating and reworking since yesterday as I want to get back into studying this language.

Specs

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

The Journey

So far it has been quite the journey to get Ruby, Rails and Gems to work on my Mac. On following a tutorial I decided to install/ update Rails API docs 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 did gem server the server was started up. So I probably installed docs a year ago and totally forgot about it.

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

like image 344
rhand Avatar asked May 13 '12 02:05

rhand


3 Answers

You can safely ignore those errors.

For now you can install gems by specifying gem install rails --no-ri --no-rdoc to install Rails without those errors.

And in the future, you could add:

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

to your ~/.gemrc file, to globally ignore documentation for future gem installs.

Also, if you're just getting started I would recommend using a ruby version manager such as rvm or rbenv. It makes life so much easier when managing different ruby versions and gemsets.

like image 183
Mark Sands Avatar answered Oct 06 '22 00:10

Mark Sands


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

RDoc generates Documentation from Ruby Source Files. So, as @Mark Sands says, it's not absolutely necessary to make your code run it can be nice to have and addresses the root of your errors.

like image 27
Anna Avatar answered Oct 05 '22 23:10

Anna


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

I eliminated most of them by changing line 127 of

~/.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 others they say deprecated with no replacement.

I only found this thread because I am trying to find out more about these. Does anyone suppose there is an update? The warnings state that these will be removed on or after 2011-11-01. The time has come and gone now.

like image 43
Douglas G. Allen Avatar answered Oct 06 '22 00:10

Douglas G. Allen