title: sunspot_rails gem - " Errno:: ECONNREFUSED (Connection refused - connect (2)) "
body: <p>I use gem sunspot_rails <a href="https://github.com/outoftime/sunspot" rel="nofollow noreferrer">https://github.com/outoftime/sunspot</a>
  I did everything according to the instructions on <a href="http://railscasts.com/episodes/278-search-with-sunspot" rel="nofollow noreferrer">http://railscasts.com/episodes/278-search-with-sunspot</a>, but get an error</p>
  
  <blockquote>
    <p>Errno:: ECONNREFUSED (Connection refused - connect (2)):
    app/controllers/books_controller.rb: 7: in `index '</p>
  </blockquote>
  
  <p>code from <strong>books_controller.rb</strong></p>
  
  <pre><code>  def index
      @search = Book.search do
        fulltext params[:search]
      end
      @books = @search.results
    end
  </code></pre>
  
  <p>what it can be?</p>