0

Hi i am using sunspot_rails gem for searching.It is working fine on my local machine but there is problems with configuring it with heroku.And i have this error

           Errno::ECONNREFUSED (Connection refused - connect(2)):

this is my sunspot.yml settings

  production:
    solr:
      hostname: index.websolr.com
      port: 8983
      log_level: WARNING

  development:
    solr:
      hostname: localhost
      port: 8982
      log_level: INFO

while i am starting sunspot solar with this command

     heroku run rake sunspot:solr:start

Please help..

Thanks

Kashiftufail
  • 10,815
  • 11
  • 45
  • 79

1 Answers1

2

The command you're trying to use fire a solr server, but you're using websolr as you stated in your configuration.

You don't need to run that command except in local, where you don't rely on websolr.

According to the documentation, sunspot_rails handles WEBSOLR_URL you could check with "heroku config" if that environment variable is correctly set by the addon.

Moreover, https://github.com/outoftime/sunspot/blob/master/sunspot_rails/lib/sunspot/rails/configuration.rb#L312 tells us that if you do not give any url or host in the yml under the production key it will fallback to that environement variable. So you may just need to wipe the hostname and port from there and it should work as intended.

jhchabran
  • 781
  • 3
  • 8
  • which file you are talking about? I am using WebSolr Add-On in heroku but it is not working. It is not reindexing data automatically. So what i do to reindexing the data automatically.. Please help me...Thanks in advance – Mohd Anas Jan 06 '14 at 05:06