![](/img/trans.png)
[英]How can I use the latest version of the Sunspot gem with Solr Cell?
[英]How do I use the edge version of Sunspot direct from Github instead of via Rubygems?
為了克服solr的錯誤,我需要運行一個比Rubysms版本的Sunspot中包含的版本更新的版本。 我注意到在Github上有一個最近的提交 ,其中包括更新版本的Solr。
如何配置我的Gemfile直接從repo而不是RubyGems。 目前我有以下幾點;
gem 'sunspot'
gem 'sunspot_rails'
gem 'sunspot_test'
gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git'
group :development, :test do
gem 'sunspot_solr'
gem 'progress_bar'
end
如果我只是將回購添加到太陽黑子寶石線,當我運行捆綁時,一切都會崩潰。 由於sunspot_solr gem 在太陽黑子回購中 ,我不知道我應該使用哪條線從回購中獲取。
謝謝,格雷姆
得到它了! 答案是指向github上的主要回購,並在適當的地方使用require將其縮小到相關的子部分。
編輯過的Gemfile如下;
gem 'sunspot', :git => "git://github.com/sunspot/sunspot.git"
gem 'sunspot_rails', :git => "git://github.com/sunspot/sunspot.git", :require => "sunspot_rails"
gem 'sunspot_test'
gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git'
group :development, :test do
gem 'sunspot_solr', :git => "git://github.com/sunspot/sunspot.git", :require => "sunspot_solr"
gem 'progress_bar'
end
我不是一個紅寶石開發人員,但這里是一個關於從Git安裝Gems的演練,可能會有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.