2012-01-20 19 views
5

私はSolr Cellを使っている最新のバージョンのSunspot gem(現在2.0.0.pre.111215、Solr 3.5を組み込んでいます)を手に入れようとしています。 https://github.com/chebyte/sunspot_cell -Solr Cellで最新バージョンのSunspot gemを使用するにはどうすればよいですか?

現在、私は、以下のプラグインが提供するSolrの電池と組み合わせた太陽黒点の古いバージョンを使用しています。

次のようにこの構成のための私のGemfileがあります。

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

残念ながら、古いバージョンのSolr/Solrセルは、多くの新しいPDFファイルでは機能しません。 Apacheが推奨する解決策は、両方の最新バージョンにアップグレードすることです。

太陽黒点Solrの細胞ボルトオンは非常によくサポートされていないようです。最近更新されたバージョンがプラグインから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 

どのようなレーキタスクを実行すると、次のエラーが発生します。

uninitialized constant Sunspot::RSolr 

私は一時的にsunspot_cell宝石をコメントアウトした場合、私は実行するためのRakeタスクを取得することができますが、実際の検索が失敗します。

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" 
)=を知っています
関連する問題