2012-01-20 2 views
5

Solr Cell과 함께 작업하는 Sunspot gem (현재 2.0.0.pre.111215, Solr 3.5 통합)의 최신 버전을 얻으려고 노력하고 있습니다.Solr Cell과 함께 최신 버전의 Sunspot gem을 어떻게 사용할 수 있습니까?

현재 다음 플러그 인에서 제공하는 Solr Cell과 함께 Sunspot의 이전 버전을 사용하고 있습니다. https://github.com/chebyte/sunspot_cell.

이 구성에 대한 내 Gemfile은 다음과 같습니다.

gem 'sunspot', '1.2.1' 
gem 'sunspot_rails' 

불행히도이 오래된 Solr/Solr 셀 조합은 많은 최신 PDF 파일에서 작동하지 않습니다. Apache가 권장하는 해결책은 최신 버전으로 업그레이드하는 것입니다.

Sunspot Solr Cell bolt-on은 잘 지원되지 않습니다. 가장 최근에 업데이트 된 버전이 Plugin에서 Gem으로 바뀌었지만 여전히 Sunspot Gem의 최신 버전에서 작동하도록 할 수는 없습니다. https://github.com/zheileman/sunspot_cell

누구나 올바른 Gemfile 구성을 사용하여 엘리먼트를 멋지게 함께 플레이하게 할 수 있습니까? 내가 가진 가장 가까운 것이 이것입니다.

gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git' 
gem 'sunspot', :git => "git://github.com/sunspot/sunspot.git" 
gem 'sunspot_rails', :git => "git://github.com/sunspot/sunspot.git", :require => "sunspot_rails" 

group :development, :test do 
    gem 'sunspot_solr', :git => "git://github.com/sunspot/sunspot.git" 
end 

레이크 작업을 실행할 때 다음 오류가 발생합니다. 나는 일시적으로 sunspot_cell 보석을 주석 경우

uninitialized constant Sunspot::RSolr 

, 나는 레이크 작업이 실행 얻을 수 있지만 실제 검색이 실패합니다.

sunspot_solr에 번들 된 것들 대신 this gem에있는 Solr jar 파일을 수동으로 시도했지만 성공하지 못했습니다.

답변

4

약간의 시행 착오 끝에, 이것에 대한 대답은 내가 기대했던 것보다 쉬웠다. 보석들은 분명히 잘못된 순서로 지정되었습니다. 나는 그것이 어떤 차이를 만든다는 것을 깨닫지 못했다. 나는 순서를 바꾸어서 sunspot_cell이 마지막이었고 마치 버스트처럼 터졌다. 마법! (거의).

gem 'sunspot', :git => "git://github.com/sunspot/sunspot.git" 
gem 'sunspot_rails', :git => "git://github.com/sunspot/sunspot.git", :require => "sunspot_rails" 
gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git' 
2

당신이 이미 그것을 고쳤다는 것을 기쁘게 생각합니다. 이것은 현재 설정 한 것입니다. 보석의 꽤 큰 엉망, 내가 아는 =)

gem 'rsolr', :git => 'git://github.com/mwmitchell/rsolr', :branch => "38b5b69a0d63cdf85560806c06f3187ea4339f5a" # 1.0.6 plus the timeout patch 
gem 'sunspot' 
gem 'sunspot_solr' 
gem 'sunspot_rails' 
gem 'sunspot_index_queue' 
gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git', :branch => "bc8ac18de1410b3e29af89c4d028acc6deba1e1c"