I've deployed my app to Heroku however whenever I try to search for a
professor or even view an individual professor (without searching) I
just get "We're sorry, but something went wrong."
Running heroku logs returns:
Rendered layouts/_header.html.erb (0.7ms)
2016-06-19T00:10:42.316086+00:00 app[web.1]: Completed 200 OK in 35ms
(Views: 32.3ms | ActiveRecord: 0.9ms)
2016-06-19T00:10:46.924567+00:00 heroku[router]: at=info method=GET
path="/professors/search?utf8=%E2%9C%93&search=test"
host=
professor-ratings.herokuapp.com
request_id=a69a87dd-7730-4bbb-a903-e1be1d2d5635 fwd="198.84.185.123"
dyno=web.1 connect=1ms service=14ms status=500 bytes=1754
2016-06-19T00:10:46.927525+00:00 app[web.1]:
2016-06-19T00:10:46.926535+00:00 app[web.1]: Completed 500 Internal
Server Error in 6ms (ActiveRecord: 0.0ms)
2016-06-19T00:10:46.918438+00:00 app[web.1]: Started GET
"/professors/search?utf8=%E2%9C%93&search=test" for 198.84.185.123 at
2016-06-19 00:10:46 +0000
2016-06-19T00:10:46.927533+00:00 app[web.1]:
app/controllers/professors_controller.rb:35:in `search'
2016-06-19T00:10:46.920628+00:00 app[web.1]: Parameters: {"utf8"=>"✓",
"search"=>"test"}
2016-06-19T00:10:46.927533+00:00 app[web.1]: Faraday::ConnectionFailed
(Connection refused - connect(2) for "localhost" port 9200):
2016-06-19T00:10:46.927534+00:00 app[web.1]:
2016-06-19T00:10:46.920585+00:00 app[web.1]: Processing by
ProfessorsController#search as HTML
2016-06-19T00:10:46.927534+00:00 app[web.1]:
I've seen a similar issue discussed on Stack Overflow and someone said
that elastic search may not be running. But if I run curl
localhost:9200 there is a hash so I believe it's running and I don't
think that's the problem.
Any help would be greatly appreciated I'm very lost this is my first app
I'm building mostly to teach myself rails so I've never deployed
anything before.
--
Posted via
http://www.ruby-forum.com/.