2012-05-13 6 views
6

MacPorts에 Ruby on Rails가 설치되어 있습니다.이 언어를 공부하기 위해 어제부터 업데이트하고 재 작업하고 있습니다.Ruby 문서 업데이트 오류

사양

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

여정

지금까지 꽤 여행이 루비, 레일 및 보석 내 Mac에서 작동하도록하는 것이 었습니다. 튜토리얼을 다음에 나는/업데이트 레일 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 서버가 최대 시작되었다. 그래서 아마 1 년 전부터 문서를 설치했고 완전히 잊어 버렸을 것입니다.

이러한 오류를 제거하려면 어떻게해야합니까? 아니면 안전하게 무시하고 계속 할 수 있습니까?

답변

8

이러한 오류는 무시해도됩니다.

이제 오류없이 레일을 설치하려면 gem install rails --no-ri --no-rdoc을 지정하여 보석을 설치할 수 있습니다.

그리고 미래에

, 당신은 추가 할 수

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

당신의 ~/.gemrc 파일로, 전 세계적으로 미래의 보석에 대한 문서는 설치 무시합니다.

방금 ​​시작했다면 rvm 또는 rbenv과 같은 루비 버전 관리자를 사용하는 것이 좋습니다. 다른 루비 버전과 보석 세트를 관리 할 때 훨씬 쉽게 작업 할 수 있습니다.

+0

입력 해 주셔서 감사합니다. @ 마크 샌즈! 당신은 RVM을 추천하는 두 번째 남자입니다. 그것으로 들여다 볼 것입니다.또한 내가 꽤 오래 전에 구입 한 책 RailsSpace가 오래된 코드를 많이 가지고 있음을 깨달았습니다. – rhand

+0

문제 없습니다! rvm 및 rbenv의 찬반 양론을 읽고 사용하려는 버전 관리자에 대한 자신의 견해를 공식화하십시오. –

3

나는 Debian 리눅스에서 동일한 경고를받으며 과 함께 rvm을 사용하고 있습니다.

나는 그들이 대체는 함께 사용되지 않는 말 다른 사람에 관해서는 127 Gem::Specification.add_spec gemspec if gemspec

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

127 add_spec gemspec if gemspec의 라인 127을 변경하여 대부분을 제거.

이 스레드에 대해 자세히 알아 내려고했기 때문에이 스레드를 발견했습니다. 누구나 업데이트가 있다고 가정합니까? 2011-11-01 이후에 경고 메시지가 제거 될 것이라는 경고가 표시됩니다. 시간이 지나갔습니다.

5

rdoc 버전 < 3.0 인 경우 gem install rdoc 또는 gem update rdoc을 시도하십시오.

RDoc은 Ruby 소스 파일에서 문서를 생성합니다. @Mark Sands에 따르면, 코드 실행을 절대적으로 수행 할 필요는 없지만 오류의 근원을 파악하고 해결할 수 있습니다.

+0

+1 주위를 둘러 보는 것보다 문제를 해결하는 것이 훨씬 더 좋기 때문에 ... –