Question

I'm trying to install WebSolr on Heroku. I chose the 20$/month package. I followed the instructions on the addon page:

I added the following to my Gemfile:

gem 'sunspot_rails', '~> 1.3.0'

In heroku config, I also have a proper URL:

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

When starting the server, I get the same error both locally and in the heroku logs:

/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'

...

The server refuses to start, I can no longer have access to any of my controllers. I have not done anything else thus far. Anyone know why this generic Solr integration break my server startup?

Was it helpful?

Solution

If you're using Sunspot 1.3 because you're also running Rails 2.x, you need to run script/generate sunspot. If you're using Rails 3 or 4, you should update to a newer Sunspot. Latest at the time of this comment is 2.1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top