Cannot install flying sphinx

Here is the error I get on heroku

→ heroku run bundle exec flying-sphinx configure
Running `bundle exec flying-sphinx configure` attached to terminal... up, run.2292
I, [2013-07-27T10:36:02.638576 #2] INFO -- : Executing Action: configure
/app/vendor/bundle/ruby/2.0.0/gems/faraday-0.8.8/lib/faraday/connection.rb:218:in `url_prefix=': undefined method `path' for "https://flying-sphinx.com":String (NoMethodError)
from /app/vendor/bundle/ruby/2.0.0/gems/faraday-0.8.8/lib/faraday/connection.rb:51:in `initialize'
from /app/vendor/bundle/ruby/2.0.0/gems/faraday-0.8.8/lib/faraday.rb:11:in `new'
from /app/vendor/bundle/ruby/2.0.0/gems/faraday-0.8.8/lib/faraday.rb:11:in `new'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/api.rb:65:in `connection'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/api.rb:37:in `block in put'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/api.rb:75:in `call'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/api.rb:75:in `log'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/api.rb:36:in `put'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/controller.rb:24:in `block in configure'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:65:in `call'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:65:in `response'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:79:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:21:in `block in perform'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:15:in `perform'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/action.rb:5:in `perform'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/controller.rb:23:in `configure'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:45:in `configure'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:28:in `block in run'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:26:in `each'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:26:in `all?'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/lib/flying_sphinx/cli.rb:26:in `run'
from /app/vendor/bundle/ruby/2.0.0/gems/flying-sphinx-1.0.0/bin/flying-sphinx:5:in `<top (required)>'
from /app/vendor/bundle/ruby/2.0.0/bin/flying-sphinx:23:in `load'
from /app/vendor/bundle/ruby/2.0.0/bin/flying-sphinx:23:in `<main>'

  1. Looks like the latest Faraday may break with Flying Sphinx. I'll try to get a patch out in the next hour or so.

  2. Odd. With flying-sphinx 1.0.0, faraday 0.8.8 and Ruby 2.0, it's working fine for me in one of my test apps. Is it possible to get access to your app to debug directly? If so, my Heroku account is [email blocked].

    If not, is there anything in your app that may be modifying Faraday? Any gems that are likely to extend/monkeypatch it?

  3. Hello Pat, thanks for the quick reply. I invited you to my app. Here is my Gemfile:

    gem 'rails', '3.2.13'
    gem 'chosen-rails'

    group :production do
      gem 'pg', '0.13.2'
      gem 'thin'
      gem 'thinking-sphinx', '3.0.3'
      gem 'flying-sphinx', '1.0.0'
      gem 'mysql2'
    end

    group :development do
      gem "better_errors"
      gem 'letter_opener'
      gem 'quiet_assets'
      gem 'binding_of_caller'
    end

    group :development, :test do
      gem 'rspec-rails'
      gem 'capybara'
      gem 'spring'
      gem "factory_girl_rails"
      gem 'sqlite3'
      gem 'email_spec'
    end

    group :assets do
      gem 'sass-rails', '~> 3.2.3'
      gem 'coffee-rails', '~> 3.2.1'
      gem 'zurb-foundation', '~> 4.0.0'
      gem 'jquery-ui-sass-rails'

      # See https://github.com/sstephenson/execjs#readme for more supported runtimes
      # gem 'therubyracer', :platforms => :ruby

      gem 'uglifier', '>= 1.0.3'
    end

    gem 'jquery-rails'
    gem 'devise'
    gem 'haml-rails'
    gem 'carrierwave'
    gem "fog", "~> 1.3.1"
    gem 'mini_magick'
    gem 'cancan'
    gem 'nested_form'
    gem 'truncate_html'
    gem "ancestry"
    gem 'mini_magick'
    gem 'cancan'
    gem 'nested_form'
    gem 'truncate_html'
    gem 'rinku', '~> 1.7', :require => 'rails_rinku'
    gem 'paper_trail'
    gem 'diffy'
    gem 'carrierwave'
    gem "fog", "~> 1.3.1"
    gem "ancestry"
    gem 'kaminari'
    gem 'stringex'
    gem "font-awesome-rails"
    gem 'airbrake'
    gem 'cartodb-rb-client', github: 'Vizzuality/cartodb-rb-client'

  4. Okay. The issue is the cartodb-rb-client gem - it monkeypatches String, adding the instance method host. Faraday expects that any uri that responds to host is actually a URI object, not a string.

    A work-around is putting the following into an initializer:

    FlyingSphinx::API.send :remove_const, :SERVER
    FlyingSphinx::API::SERVER = Kernel.URI 'https://flying-sphinx.com'
    

    This will ensure Faraday is actually passed a URI object instead of a string when the connection is set up. Of course, you'll want to add some index definitions before you get to sending the configuration through to Flying Sphinx :)

  5. Also: I've logged an issue with cartodb-rb-client alerting them to this problem:
    https://github.com/Vizzuality/cartodb-rb-client/issues/17

Reply to this discussion Internal reply only staff will see it

Markdown

Attaching KB article:

» »

Read more…

Attach files

Up to 10MB each.

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions