searchkick: connect_timeout=() does not exist for Typhoeus::Request class

Hi, I cant reindex afte install gem Typhoeus

rake searchkick:reindex CLASS=Film rake aborted! NoMethodError: undefined method connect_timeout=' for #<Typhoeus::Request:0x007f8a00777f90> /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/faraday-0.9.1/lib/faraday/adapter/typhoeus.rb:104:inconfigure_timeout’ /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/faraday-0.9.1/lib/faraday/adapter/typhoeus.rb:47:in request' /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/faraday-0.9.1/lib/faraday/adapter/typhoeus.rb:22:inperform_request’ /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/faraday-0.9.1/lib/faraday/adapter/typhoeus.rb:14:in call' /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:inbuild_response’ /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/faraday-0.9.1/lib/faraday/connection.rb:377:in run_request' /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/elasticsearch-transport-1.0.6/lib/elasticsearch/transport/transport/http/faraday.rb:21:inblock in perform_request’ /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/elasticsearch-transport-1.0.6/lib/elasticsearch/transport/transport/base.rb:187:in call' /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/elasticsearch-transport-1.0.6/lib/elasticsearch/transport/transport/base.rb:187:inperform_request’ /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/elasticsearch-transport-1.0.6/lib/elasticsearch/transport/transport/http/faraday.rb:20:in perform_request' /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/elasticsearch-transport-1.0.6/lib/elasticsearch/transport/client.rb:111:inperform_request’ /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/elasticsearch-api-1.0.6/lib/elasticsearch/api/namespace/common.rb:21:in perform_request' /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/elasticsearch-api-1.0.6/lib/elasticsearch/api/actions/indices/get_aliases.rb:29:inget_aliases’ /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/searchkick-0.8.5/lib/searchkick/reindex.rb:42:in clean_indices' /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/searchkick-0.8.5/lib/searchkick/reindex.rb:13:inreindex’ /Users/yurgon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/searchkick-0.8.5/lib/searchkick/tasks.rb:10:in `block (2 levels) in <top (required)>’ Tasks: TOP => searchkick:reindex (See full trace by running task with --trace)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

I created an initializer called “elasticsearch.rb” and added this,

require "faraday"
require "typhoeus/adapters/faraday"
Searchkick.client = Elasticsearch::Client.new(hosts: ["127.0.0.1:9200", "127.0.0.1:9201"], retry_on_failure: true)

And it magically worked! Hope this helps.

Cleaning up issues. typhoeus/adapters/faraday is now automatically required when typhoeus is detected, fwiw.

Able to reproduce the error if require "typhoeus/adapters/faraday" is not included in an initializer. I’d check if it’s that.

https://github.com/ankane/searchkick#performance