2012-12-26 2 views
1

이 여기에 나는이로 실행했습니다 처음은 아니다,하지만 구체적인 예입니다 :Bundler는 보석의 의존성을 충족시키기 위해 특정 버전이 필요하다고 생각하는 이유는 무엇입니까?

$ bundle update rails 
Fetching source index for http://rubygems.org/ 
Bundler could not find compatible versions for gem "builder": 
    In Gemfile: 
    rails (~> 3.0.0) ruby depends on 
     builder (~> 2.1.2) ruby 

    hoptoad_notifier (>= 0) ruby depends on 
     builder (3.0.0) 

그래서 Bundler 프로그램은 hoptoad_notifier 보석 빌더의 3.0.0 버전에 따라 달라집니다 주장하고있다. 그러나, 그것은 단지 필요 그렇지 않다 빌더

$ gem dependency hoptoad_notifier 
Gem hoptoad_notifier-2.4.11 
    actionpack (>= 0, development) 
    activerecord (>= 0, development) 
    activesupport (>= 0, runtime) 
    bourne (>= 0, development) 
    builder (>= 0, runtime) 
    nokogiri (>= 0, development) 
    shoulda (>= 0, development) 

0 왜 Bundler를가 hoptoad_notifier 빌더 3.0.0에 따라 생각 하는가> =? Gemfile 및 Gemfile.lock에서

선정 비트 :

source "http://rubygems.org" 

gem 'rails', '~> 3.0.0' 
gem 'hoptoad_notifier' 
...a bunch of testing gems, custom gems, etc. 

Gemfile.lock는

GEM 
    remote: http://rubygems.org/ 
    specs: 
    actionmailer (2.3.14) 
     actionpack (= 2.3.14) 
... 
    builder (3.0.0) 
... 
    cucumber (1.2.0) 
     builder (>= 2.1.2) 
     diff-lcs (>= 1.1.3) 
     gherkin (~> 2.10.0) 
     json (>= 1.4.6) 
... 
    hoptoad_notifier (2.4.11) 
     activesupport 
     builder 
... no other mentions of builder 
+0

gemfile은 어떤 모양입니까? –

답변

2

나는 질문에 대한 답변보다 해결이 더 고려, 그래서 나는거야 잠시 질문을 열어 더 나은 대답이 있는지 확인하십시오.

(특정 보석에 대한 번들 업데이트 사용, Gemfile 수정, 번들 설치 실행) 문제를 공격하는 여러 가지 방법을 발견했지만 다양한 종속성에 대해이 오류의 일부 양식이 계속 실행되었습니다. 정말 Bundler의 문제처럼 보입니다. (나는 v1.0.22를 사용하여 업그레이드가 더 심해졌습니다.) 궁극적으로,이 혼란에서 벗어난 이유는 Gemfile.lock을 삭제하고 번들 설치를 실행하여 Bundler가 모든 종속성을 처음부터 해결하도록하는 것이 었습니다. 물론 잠금 파일을 가지고있는 이유는 앱의 의존성을 잠그는 것이기 때문에 이것은 이상적입니다. 그러나 Rails를 v3으로 업그레이드 했으므로이 경우에는 허용됩니다.