복붙노트

[RUBY-ON-RAILS] Gem.source_index는 사용 사양, 사용되지 않습니다. 나는 보석 또는 레일을 다시 설치해야합니까?

RUBY-ON-RAILS

Gem.source_index는 사용 사양, 사용되지 않습니다. 나는 보석 또는 레일을 다시 설치해야합니까?

나는 응용 프로그램을 생성하려고 할 때 나는 우분투 11 당함에 다음과 같은 메시지의 RoR을 배우는 중이에요. 내가 잘못 뭔가를 설치 했습니까?

$ rails generate controller Pages home contact
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/shared_helpers.rb:3.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/source.rb:162.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/source.rb:162.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/shared_helpers.rb:84.

해결법

  1. ==============================

    1.이것은 나를 위해 일한 : 다운 그레이드 젬를 :

    이것은 나를 위해 일한 : 다운 그레이드 젬를 :

    gem update --system 1.6.2
    

    에서이 조언을 발견 Gem.source_index는 사용 사양 # 34되지 않습니다

  2. ==============================

    2.이 시도:

    이 시도:

    sudo gem update bundler
    

    이 최신 버전 (현재 1.0.15)에 들러 업데이트됩니다. 이것은이 경고의 원인이었던 내 경우에는 경고 또는 적어도를 생성하지 않습니다.

  3. ==============================

    3.이 문제를 해결하는 가장 좋은 방법은 다음과 같습니다

    이 문제를 해결하는 가장 좋은 방법은 다음과 같습니다

    $ gem pristine --all --no-extensions
    

    이것은 (기본 확장자를 가진 사람을 제외한) 모든 보석을 다시 자신의 gemspecs를 업데이트합니다. 네이티브 확장 어떤 보석이 없거나 당신이 그 보석에 사용자 정의 컴파일 플래그를 사용하지 않은 경우 당신은 또한 --no-확장 플래그를 생략 할 수 있습니다. 그렇지 않으면 당신은 별도로를 구축해야합니다.

  4. ==============================

    4.나는 "sudo는 보석 업데이트"를 시도했다. 그 후, 난 더 이상 ... "사양을 사용 Gem.source_index가되지 않습니다"라는 메시지가 표시되지 않습니다. 야호!

    나는 "sudo는 보석 업데이트"를 시도했다. 그 후, 난 더 이상 ... "사양을 사용 Gem.source_index가되지 않습니다"라는 메시지가 표시되지 않습니다. 야호!

  5. ==============================

    5.레일 -v = 2.2.2

    레일 -v = 2.2.2

    -v = 루비 1.8.7

    이 링크는 나에게 도움이됩니다.

    또는 간단하게 할

    gem update --system 1.6.2
    
  6. from https://stackoverflow.com/questions/6065383/gem-source-index-is-deprecated-use-specification-should-i-re-install-gem-or-ra by cc-by-sa and MIT license