2014-05-07 54 views
0

我試圖在Heroku上安裝WebSolr。我選擇了20美元/月的套餐。 我跟着插件頁面上的說明:WebSolr Heroku,默認安裝破解服務器啓動

添加以下到我的Gemfile:

gem 'sunspot_rails', '~> 1.3.0' 

在Heroku的配置,我也有一個正確的URL:

WEBSOLR_URL:   http://index.websolr.com/solr/xxxyyyzzz 

當啓動服務器,我在本地和在heroku日誌中都得到相同的錯誤:

/Users/patricegagnon/.rvm/gems/ruby-2.1.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `join': no implicit conversion of nil into String (TypeError) 
from /Users/patricegagnon/.rvm/gems/ruby-2.1.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `user_configuration' 
from /Users/patricegagnon/.rvm/gems/ruby-2.1.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:281:in `user_configuration_from_key' 
from /Users/patricegagnon/.rvm/gems/ruby-2.1.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:256:in `disabled?' 
from /Users/patricegagnon/.rvm/gems/ruby-2.1.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails.rb:30:in `build_session' 
from /Users/patricegagnon/.rvm/gems/ruby-2.1.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/init.rb:1:in `<top (required)>' 
from /Users/patricegagnon/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require' 
from /Users/patricegagnon/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require' 

...

服務器拒絕啓動,我無法再訪問我的任何控制器。到目前爲止我還沒有做過任何其他事情。任何人都知道爲什麼這種通用的Solr集成打破了我的服務器啓動?

回答

3

如果您使用的是太陽黑子1.3,因爲您也在運行Rails 2.x,則需要運行script/generate sunspot。如果您使用的是Rails 3或4,則應該更新爲新的Sunspot。當前最新的評論是2.1。