WebSolr Heroku,默认安装打破服务器启动

时间:2014-05-07 19:22:36

标签: heroku websolr

我试图在Heroku上安装WebSolr。我选择了20美元/月的套餐。 我按照插件页面上的说明进行操作:

我将以下内容添加到我的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集成会破坏我的服务器启动?

1 个答案:

答案 0 :(得分:3)

如果您正在使用Sunspot 1.3,因为您还运行Rails 2.x,则需要运行script/generate sunspot。如果你正在使用Rails 3或4,你应该更新到更新的太阳黑子。本评论发表时的最新内容是2.1。