Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6947411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:41:23+00:00 2026-05-27T13:41:23+00:00

So I am using a SearchController to manage sitewide searches (user queries are full-text

  • 0

So I am using a SearchController to manage sitewide searches (user queries are full-text searched in two different models), and it works in the rails development server, but it doesn’t work on Heroku. I suspect this means I am committing some sort of MVC or RESTful logic error because I think I have had this issue before with heroku and my localhost server where the latter was more lenient with my code. Should I be using a collection or member route of some sort?

Search Controller:

  def index
    @search = Post.search do
      fulltext params[:search]
    end
    @posts = @search.results
    @search = Group.search do
      fulltext params[:search]
    end
    @groups = @search.results
  end

Route:

resources :search, :only => [:index]

Search form (in HAML):

-form_tag '/search', :method => :get do
        =text_field_tag :search, params[:search], :id => 'searchfield'
        =submit_tag 'search',:name => nil, :id => 'searchbutton'

Heroku Logs from the failed action:

2011-12-16T04:05:20+00:00 app[web.1]: Started GET "/search?utf8=%E2%9C%93&search=integer" for 
68.6.74.167 at 2011-12-15 20:05:20 -0800
2011-12-16T04:05:20+00:00 app[web.1]:   Processing by SearchController#index as HTML
2011-12-16T04:05:20+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "search"=>"integer"}
2011-12-16T04:05:23+00:00 heroku[router]: GET stormy-robot-3215.heroku.com/search dyno=web.1 queue=0 wait=0ms service=3030ms status=500 bytes=728
2011-12-16T04:05:23+00:00 app[web.1]: Completed   in 3022ms
2011-12-16T04:05:23+00:00 app[web.1]: 
2011-12-16T04:05:23+00:00 app[web.1]: Errno::ECONNREFUSED (Connection refused - connect(2)):
2011-12-16T04:05:23+00:00 app[web.1]:   app/controllers/search_controller.rb:3:in `index'
2011-12-16T04:05:23+00:00 app[web.1]: 
2011-12-16T04:05:23+00:00 app[web.1]: 

Thanks for your help. Let me know if I should give any more information

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:41:23+00:00Added an answer on May 27, 2026 at 1:41 pm

    Your code is fine, the only problem is that your Heroku application can’t connect to any Solr host.

    If you’re using the Websolr addon in Heroku then you should open a support ticket because this should be working. Otherwise, you should run this in the heroku console:

    Sunspot.config.solr.url
    

    If that points to “http://127.0.0.1:8983/solr” or similar then that’s your problem. You need that to point to some internet-accessible Solr server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using C#, I need a class called User that has a username, password, active
I have a Controller bean (SearchController) that has two managed bean as managed properties
Using Rails 3.2.0 with haml and sass: I Would like to link an external
I'm building an ASP.NET MVC site where I'm using Lucene.Net for search queries. I
Using report builder 3.0, I have a report that queries a cube. How do
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
using this example on dynamic list https://github.com/sandeepleo11/Dynamic-Select-Menus-in-Rails-3 I managed to get dynamic select in
Using ruby(1.8.7) , rails(2.3.8) , rspec(1.3.1) and rspec-rails(1.3.3) how do I test a method
Using JavaScript to dynamically add and animate text in a specific group in SVG,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.