Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

bundle install: undefined method `use_ssl=' for #<Net::HTTP::Persistent::SSLReuse #4054

Closed
xiaoduwuer opened this issue Oct 13, 2015 · 6 comments

Comments

@xiaoduwuer
Copy link

dongchao:xmo iclick$ bundle install
--- ERROR REPORT TEMPLATE -------------------------------------------------------

  • What did you do?

    I ran the command /Users/iclick/.rvm/gems/ruby-1.9.1-p431/bin/bundle install

  • What did you expect to happen?

    I expected Bundler to...

  • What happened instead?

    Instead, what actually happened was...

Error details

NoMethodError: undefined method `use_ssl=' for #<Net::HTTP::Persistent::SSLReuse ruby.taobao.org:443 open=false>
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/vendor/net/http/persistent.rb:1136:in `ssl'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/vendor/net/http/persistent.rb:626:in `connection_for'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/vendor/net/http/persistent.rb:994:in `request'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/fetcher/downloader.rb:45:in `request'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/fetcher/downloader.rb:15:in `fetch'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/fetcher/dependency.rb:7:in `api_available?'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/fetcher.rb:135:in `block in use_api'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/fetcher.rb:135:in `reject!'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/fetcher.rb:135:in `use_api'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/source/rubygems.rb:320:in `select'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/source/rubygems.rb:320:in `api_fetchers'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/source/rubygems.rb:325:in `block in remote_specs'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/index.rb:9:in `build'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/source/rubygems.rb:324:in `remote_specs'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/source/rubygems.rb:81:in `specs'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/definition.rb:211:in `block (2 levels) in index'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/definition.rb:209:in `each'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/definition.rb:209:in `block in index'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/index.rb:9:in `build'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/definition.rb:206:in `index'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/definition.rb:200:in `resolve'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/definition.rb:140:in `specs'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/definition.rb:129:in `resolve_remotely!'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/installer.rb:79:in `run'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/installer.rb:18:in `install'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/cli/install.rb:107:in `run'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/cli.rb:162:in `install'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/cli.rb:10:in `start'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/bin/bundle:20:in `block in <top (required)>'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/gems/bundler-1.10.5/bin/bundle:18:in `<top (required)>'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/bin/bundle:19:in `load'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/bin/bundle:19:in `<main>'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/bin/ruby_executable_hooks:15:in `eval'
  /Users/iclick/.rvm/gems/ruby-1.9.1-p431/bin/ruby_executable_hooks:15:in `<main>'

Environment

Bundler   1.10.5
Rubygems  1.3.7
Ruby      1.9.1p431 (2011-02-18 revision 30908) [i386-darwin14.3.0]
GEM_HOME  /Users/iclick/.rvm/gems/ruby-1.9.1-p431
GEM_PATH  /Users/iclick/.rvm/gems/ruby-1.9.1-p431:/Users/iclick/.rvm/gems/ruby-1.9.1-p431@global
RVM       1.26.11 (latest)
Git       2.4.2
rubygems-bundler (1.4.4)

Bundler settings

mirror.https://rubygems.org/
  Set for the current user (/Users/iclick/.bundle/config): "http://ruby.taobao.org"
gem.coc
  Set for the current user (/Users/iclick/.bundle/config): "true"
gem.mit
  Set for the current user (/Users/iclick/.bundle/config): "true"
gem.test
  Set for the current user (/Users/iclick/.bundle/config): "false"

--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=undefined+method+%60use_ssl%3D%27+for+%23%3CNet%3A%3AHTTP%3A%3APersistent%3A%3ASSLReuse+ruby.taobao.org%3A443+open%3Dfalse%3E&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/bundler/bundler/issues/new
You have new mail in /var/mail/iclick
dongchao:xmo iclick$

@segiddins
Copy link
Member

Do we still support RG 1.3.7?

@indirect
Copy link
Member

Yes :'(

@xiaoduwuer
Copy link
Author

now,i have updated the RG to version 2.3.8,but did not work, it still the same error message

@agis
Copy link
Contributor

agis commented Oct 21, 2015

@OneMain Can you post your new bundle env output (after upgrading rubygems) and a stripped-down Gemfile that reproduces the issue?

@agis agis changed the title bundle install error bundle install: undefined method `use_ssl=' for #<Net::HTTP::Persistent::SSLReuse Oct 21, 2015
@indirect
Copy link
Member

Based on the backtrack this is some situation where ruby is compiled without SSL, and Net HTTP Persistent doesn't check for the use_ssl= method before trying to use it. Maybe we can catch this and throw the Bundler SSL missing error?

homu added a commit that referenced this issue Dec 27, 2015
…=indirect

Catch NoMethodError for `use_ssl=` and raise appropriate FriendlyErrors warning

Addresses #4054.

- `NoMethodError` for `use_ssl=` in the downloader should now throw a `LoadError` with `cannot load such file -- openssl` as the message which will be caught and logged by the `FriendlyErrors` module as an OpenSSL Ruby error.
@RochesterinNYC
Copy link
Contributor

Addressed by #4188

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

No branches or pull requests

5 participants