I have get the add on on heroku application, and added required sunspot gem in Gemfile and there is WEBSOLR_URL
value in heroku config variables.
The sunspot.yml
has also been added and the production settings is some thing like this production:
solr:
hostname: <%=ENV["WEBSOLR_URL"]%>
port: 8983
log_level: WARNING
but still search is getting crash on heroku with this error
RSolr::Error::Http (RSolr::Error::Http - 404 Not Found
2012-01-18T05:27:31+00:00 app[web.1]: Error: <html><head><title>Apache Tomcat/6.0.28 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /solr/KEY_m0/select</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/solr/a55_m0/select</u></p><p><b>description</b> <u>The requested resource (/solr/KEY_m0/select) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.28</
P.S.
I have replaced the actual api key with KEY word.
I don't think you can embed ERB tags into your sunspot.yml file - the line <%=ENV["WEBSOLR_URL"]%>
is probably getting parsed literally.
I'm looking at my sunspot.yml for a heroku app I'm running, and it looks like I don't really have any settings for production at all. So long as heroku's WEBSOLR_URL is set correctly, I think that overrides the sunspot.yml anyway. I'd try removing that concat tag altogether; it might be what's tripping things up.