janko / down

Streaming downloads using Net::HTTP, http.rb or HTTPX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Http 5.0

mgrunberg opened this issue · comments

Hi, I'm using Down::Http backend on a project. http 5.0.0 has been released a few days ago. I tried to upgrade the gem but I'm getting the following error:

Gem::LoadError: can't activate http (>= 2.1.0, < 5), already activated http-5.0.0. Make sure all dependencies are added to Gemfile.

Here is a script to reproduce the error.

require 'bundler/inline'

gemfile(true) do
  source 'https://rubygems.org'

  gem 'down', '~> 5.2'
  gem 'http', '~> 5.0'
end

require "down/http"

tempfile = Down::Http.download("https://www.google.com")
puts tempfile.path

The error is raised by a restriction on Down::Http backend.

I made PR #55 to allow version 5.x.

#55 has been merged.