Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uninitialized constant Faraday::Adapter::EMSynchrony::ParallelManager #2

Open
Roguelazer opened this issue Jan 19, 2023 · 1 comment

Comments

@Roguelazer
Copy link

Roguelazer commented Jan 19, 2023

I'm trying to use this gem and it seems like I'm missing something?

Gemfile

source "https://rubygems.org"
ruby "~> 3.2"

gem "faraday", "~> 1.0"
gem "faraday-em_synchrony", "~> 1.0"

script.rb

require 'faraday'

conn = Faraday.new do |builder|
  builder.adapter :em_synchrony
end

resps = conn.in_parallel do
  conn.head "https://www.example.com"
end

puts resps

This fails immediately with

./.bundle/ruby/3.2.0/gems/faraday-em_synchrony-1.0.0/lib/faraday/adapter/em_synchrony.rb:37:in `setup_parallel_manager': uninitialized constant Faraday::Adapter::EMSynchrony::ParallelManager (NameError)

        ParallelManager.new
        ^^^^^^^^^^^^^^^
Did you mean?  Faraday::Adapter::EMSynchrony::Parallelism
	from ./.bundle/ruby/3.2.0/gems/faraday-1.10.3/lib/faraday/connection.rb:368:in `default_parallel_manager'
	from ./.bundle/ruby/3.2.0/gems/faraday-1.10.3/lib/faraday/connection.rb:390:in `in_parallel'
	from script.rb:7:in `<main>'

Is there another dependency that I'm missing?

@Roguelazer
Copy link
Author

Answer: yes; this gem doesn't depend on em-synchrony, so it needs to be added to the Gemfile, despite what the README says.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant