I am following a tutorial where we want to add a search functionality to the app. But when I run rake searchkick:reindex CLASS=Movie
in the terminal I get
rake aborted!
Faraday::ConnectionFailed: Connection refused - connect(2) for "localhost" port 9200
/usr/local/rvm/gems/ruby-2.2.1/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:80:in `perform_request'
/usr/local/rvm/gems/ruby-2.2.1/gems/faraday-
Tasks: TOP => searchkick:reindex
(See full trace by running task with --trace)
Is there any other way to get around this when using an online IDE? I think this only happens to those who use online editors.
Searchkick is a gem that works with elasticsearch. Maybe you need to install elasticsearch first or run it if you have already installed.
You can check how to setup elasticsearch in the following link: