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

NoMethodError: undefined method `remotes' for #<Bundler::Source::Git:0x00007feb7695c270> #6585

Closed
Dakta opened this issue Jun 14, 2018 · 2 comments

Comments

@Dakta
Copy link

Dakta commented Jun 14, 2018

--- ERROR REPORT TEMPLATE -------------------------------------------------------

Error Report

Questions

  • What did you do?

    I configured a gem dependency to use a local git repository:

gem 'beaker-vcloud', :git => 'puppetlabs/beaker-vcloud', :branch => 'master'

Upon bundle instastall, Bundler complained of a nonexistant binstub. This binstub should not exist in the listed location anyways:

Using beaker-vcloud 0.2.0 from puppetlabs/beaker-vcloud (at ~/Projects/beaker-vcloud@0c2fa2b)
`~/Projects/beaker-vcloud/bin/beaker` does not exist, maybe `gem pristine beaker-vcloud` will fix it?

Related, rbenv-bundler is installed, however $ beaker fails although $ bundle exec beaker works fine.

I ran the command bundle pristine as suggested by Bundler in the binstub message.

  • What did you expect to happen?

    I expected Bundler to make my gems pristine. Or at least to cause no change, since I had just run $ bundle install.

  • What happened instead?

    Instead, bundler completely deleted the local git repository for beaker-vcloud. It appears that the pristine process for git-source gems is to re-clone them. Obviously, a local repo (which may be installed from a fork, different from the listed repo in the Gemfile) contains information about its origin which makes it impossible to re-clone if it's been cleaned. Either way, pristine should not scrub the .git directory as it appears to be doing.

  • Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?

    This may be helped by NoMethodError: undefined method remotes' for #<Bundler::Source::Gemspec:0x47101377289620 source at .`> Did you mean? remote! #6563, however that does not provide a clean solution.

  • Have you read our issues document, https://github.com/bundler/bundler/blob/master/doc/contributing/ISSUES.md?

    Yes.

Backtrace

NoMethodError: undefined method `remotes' for #<Bundler::Source::Git:0x00007feb7695c270>
Did you mean?  remote!
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/installer/gem_installer.rb:47:in `gem_install_message'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/installer/gem_installer.rb:39:in `failure_message'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/installer/gem_installer.rb:34:in `specific_failure_message'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/installer/gem_installer.rb:25:in `rescue in install_from_spec'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/installer/gem_installer.rb:15:in `install_from_spec'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli/pristine.rb:39:in `block in run'
  ~/.rbenv/versions/2.5.1/lib/ruby/2.5.0/forwardable.rb:229:in `each'
  ~/.rbenv/versions/2.5.1/lib/ruby/2.5.0/forwardable.rb:229:in `each'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli/pristine.rb:15:in `run'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli.rb:638:in `pristine'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli.rb:27:in `dispatch'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/cli.rb:18:in `start'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/exe/bundle:30:in `block in <top (required)>'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
  ~/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/exe/bundle:22:in `<top (required)>'
  ~/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
  ~/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'

Environment

Bundler       1.16.2
  Platforms   ruby, x86_64-darwin-17
Ruby          2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
  Full Path   ~/.rbenv/versions/2.5.1/bin/ruby
  Config Dir  ~/.rbenv/versions/2.5.1/etc
RubyGems      2.7.6
  Gem Home    ~/Projects/beaker/vendor/bundle/ruby/2.5.0
  Gem Path
  User Path   ~/.gem/ruby/2.5.0
  Bin Dir     ~/Projects/beaker/vendor/bundle/ruby/2.5.0/bin
OpenSSL
  Compiled    OpenSSL 1.0.2o  27 Mar 2018
  Loaded      OpenSSL 1.0.2o  27 Mar 2018
  Cert File   /usr/local/etc/openssl/cert.pem
  Cert Dir    /usr/local/etc/openssl/certs
Tools
  Git         2.15.1
  RVM         not installed
  rbenv       rbenv 1.1.1

  chruby      not installed

Bundler Build Metadata

Built At          2018-05-16
Git SHA           9f7bf0ac3
Released Version  true

Bundler settings

local.beaker-vcloud
  Set for the current user (~/.bundle/config): "~/Projects/beaker-vcloud"
path
  Set for your local app (~/Projects/beaker/.bundle/config): "./vendor/bundle"

Gemfile

Gemfile

source ENV['GEM_SOURCE'] || "https://rubygems.org"

gemspec

# This section of the gemspec is for Puppet CI; it will pull in
# a supported beaker library for testing to overwrite the gemspec if
# a corresponding ENV var is found. Currently, the only supported lib
# is beaker-pe, which can be injected into the dependencies when the
# following ENV vars are defined: BEAKER_PE_PR_AUTHOR,
# BEAKER_PE_PR_COMMIT, BEAKER_PE_PR_REPO_URL. These correspond to the
# ghprb variables ghprbPullAuthorLogin, ghprbActualCommit,
# and ghprbAuthorRepoGitUrl respectively. In the "future", we should
# make this a standard format so we can pull in more than predefined
# variables.

if ENV['BEAKER_PE_PR_REPO_URL']
  lib = ENV['BEAKER_PE_PR_REPO_URL'].match(/\/([^\/]+)\.git$/)[1]
  author = ENV['BEAKER_PE_PR_AUTHOR']
  ref = ENV['BEAKER_PE_PR_COMMIT']
  gem lib, :git => "git@github.com:#{author}/#{lib}.git", :branch => ref
end

# This line not standard in puppetlabs/beaker
gem 'beaker-vcloud', :git => 'puppetlabs/beaker-vcloud', :branch => 'master'

Gemfile.lock

GIT
  remote: puppetlabs/beaker-vcloud
  revision: 0c2fa2b3dd9a1d3b2ab7be21d9a2f3ffb6fdfd32
  branch: master
  specs:
    beaker-vcloud (0.2.0)
      beaker-vmpooler
      beaker-vmware
      rbvmomi (~> 1.9)
      stringify-hash (~> 0.0.0)

PATH
  remote: .
  specs:
    beaker (3.35.0)
      beaker-abs (~> 0.4)
      beaker-aws (~> 0.1)
      beaker-docker (~> 0.1)
      beaker-google (~> 0.1)
      beaker-hiera (~> 0.0)
      beaker-hostgenerator
      beaker-openstack (~> 0.1)
      beaker-puppet (~> 0.0)
      beaker-vagrant (~> 0.1)
      beaker-vcloud (~> 0.1)
      beaker-vmpooler (~> 1.0)
      beaker-vmware (~> 0.1)
      hocon (~> 1.0)
      in-parallel (~> 0.1)
      inifile (~> 3.0)
      minitar (~> 0.6)
      minitest (~> 5.4)
      net-scp (~> 1.2)
      net-ssh (~> 4.0)
      open_uri_redirections (~> 0.2.1)
      pry-byebug (~> 3.4.2)
      rb-readline (~> 0.5.3)
      rsync (~> 1.0.9)
      stringify-hash (~> 0.0)
      thor (~> 0.19)

GEM
  remote: https://rubygems.org/
  specs:
    CFPropertyList (2.3.6)
    addressable (2.5.2)
      public_suffix (>= 2.0.2, < 4.0)
    ansi (1.5.0)
    ast (2.4.0)
    aws-sdk-v1 (1.67.0)
      json (~> 1.4)
      nokogiri (~> 1)
    beaker-abs (0.5.0)
    beaker-aws (0.4.0)
      aws-sdk-v1 (~> 1.57)
      stringify-hash (~> 0.0.0)
    beaker-docker (0.3.3)
      docker-api
      stringify-hash (~> 0.0.0)
    beaker-google (0.1.0)
      google-api-client (~> 0.9)
      stringify-hash (~> 0.0.0)
    beaker-hiera (0.1.1)
      stringify-hash (~> 0.0.0)
    beaker-hostgenerator (1.1.13)
      deep_merge (~> 1.0)
      stringify-hash (~> 0.0.0)
    beaker-openstack (0.2.0)
      fog-openstack
      stringify-hash (~> 0.0.0)
    beaker-puppet (0.15.2)
      in-parallel (~> 0.1)
      oga
      stringify-hash (~> 0.0.0)
    beaker-vagrant (0.5.0)
      stringify-hash (~> 0.0.0)
    beaker-vmpooler (1.2.0)
      stringify-hash (~> 0.0.0)
    beaker-vmware (0.2.0)
      fission (~> 0.4)
      rbvmomi (~> 1.9)
      stringify-hash (~> 0.0.0)
    builder (3.2.3)
    byebug (9.0.6)
    coderay (1.1.2)
    declarative (0.0.10)
    declarative-option (0.1.0)
    deep_merge (1.2.1)
    diff-lcs (1.3)
    docile (1.3.1)
    docker-api (1.34.2)
      excon (>= 0.47.0)
      multi_json
    excon (0.62.0)
    fakefs (0.13.3)
    faraday (0.15.2)
      multipart-post (>= 1.2, < 3)
    fission (0.5.0)
      CFPropertyList (~> 2.2)
    fog-core (1.45.0)
      builder
      excon (~> 0.58)
      formatador (~> 0.2)
    fog-json (1.0.2)
      fog-core (~> 1.0)
      multi_json (~> 1.10)
    fog-openstack (0.1.25)
      fog-core (~> 1.40)
      fog-json (>= 1.0)
      ipaddress (>= 0.8)
    formatador (0.2.5)
    google-api-client (0.23.0)
      addressable (~> 2.5, >= 2.5.1)
      googleauth (>= 0.5, < 0.7.0)
      httpclient (>= 2.8.1, < 3.0)
      mime-types (~> 3.0)
      representable (~> 3.0)
      retriable (>= 2.0, < 4.0)
    googleauth (0.6.2)
      faraday (~> 0.12)
      jwt (>= 1.4, < 3.0)
      logging (~> 2.0)
      memoist (~> 0.12)
      multi_json (~> 1.11)
      os (~> 0.9)
      signet (~> 0.7)
    hocon (1.2.5)
    httpclient (2.8.3)
    in-parallel (0.1.17)
    inifile (3.0.0)
    ipaddress (0.8.3)
    json (1.8.6)
    jwt (2.1.0)
    little-plugger (1.1.4)
    logging (2.2.2)
      little-plugger (~> 1.1)
      multi_json (~> 1.10)
    memoist (0.16.0)
    method_source (0.9.0)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    mini_portile2 (2.3.0)
    minitar (0.6.1)
    minitest (5.11.3)
    multi_json (1.13.1)
    multipart-post (2.0.0)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-ssh (4.2.0)
    nokogiri (1.8.2)
      mini_portile2 (~> 2.3.0)
    oga (2.15)
      ast
      ruby-ll (~> 2.1)
    open_uri_redirections (0.2.1)
    os (0.9.6)
    pry (0.11.3)
      coderay (~> 1.1.0)
      method_source (~> 0.9.0)
    pry-byebug (3.4.3)
      byebug (>= 9.0, < 9.1)
      pry (~> 0.10)
    public_suffix (3.0.2)
    rake (10.5.0)
    rb-readline (0.5.5)
    rbvmomi (1.12.0)
      builder (~> 3.0)
      json (>= 1.8)
      nokogiri (~> 1.5)
      trollop (~> 2.1)
    representable (3.0.4)
      declarative (< 0.1.0)
      declarative-option (< 0.2.0)
      uber (< 0.2.0)
    retriable (3.1.1)
    rspec (3.7.0)
      rspec-core (~> 3.7.0)
      rspec-expectations (~> 3.7.0)
      rspec-mocks (~> 3.7.0)
    rspec-core (3.7.1)
      rspec-support (~> 3.7.0)
    rspec-expectations (3.7.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.7.0)
    rspec-its (1.2.0)
      rspec-core (>= 3.0.0)
      rspec-expectations (>= 3.0.0)
    rspec-mocks (3.7.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.7.0)
    rspec-support (3.7.1)
    rsync (1.0.9)
    ruby-ll (2.1.2)
      ansi
      ast
    signet (0.8.1)
      addressable (~> 2.3)
      faraday (~> 0.9)
      jwt (>= 1.5, < 3.0)
      multi_json (~> 1.10)
    simplecov (0.16.1)
      docile (~> 1.1)
      json (>= 1.8, < 3)
      simplecov-html (~> 0.10.0)
    simplecov-html (0.10.2)
    stringify-hash (0.0.2)
    thor (0.20.0)
    trollop (2.1.2)
    uber (0.1.0)
    yard (0.9.14)

PLATFORMS
  ruby

DEPENDENCIES
  beaker!
  beaker-vcloud!
  fakefs (~> 0.6, < 0.14.0)
  rake (~> 10.0)
  rspec (~> 3.0)
  rspec-its
  simplecov
  yard (~> 0.9.11)

BUNDLED WITH
   1.16.2

Gemspecs

beaker.gemspec

# -*- encoding: utf-8 -*-
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require 'beaker/version'

Gem::Specification.new do |s|
  s.name        = "beaker"
  s.version     = Beaker::Version::STRING
  s.authors     = ["Puppet"]
  s.email       = ["delivery@puppet.com"]
  s.homepage    = "https://github.com/puppetlabs/beaker"
  s.summary     = %q{Let's test Puppet!}
  s.description = %q{Puppet's accceptance testing harness}
  s.license     = 'Apache2'

  s.files         = `git ls-files`.split("\n")
  s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
  s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
  s.require_paths = ["lib"]

  s.required_ruby_version = Gem::Requirement.new('>= 2.1.8')

  # Testing dependencies
  s.add_development_dependency 'rspec', '~> 3.0'
  s.add_development_dependency 'rspec-its'
  s.add_development_dependency 'fakefs', '~> 0.6', '< 0.14.0'
  s.add_development_dependency 'simplecov'
  s.add_development_dependency 'rake', '~> 10.0'

  # Documentation dependencies
  s.add_development_dependency 'yard', '~> 0.9.11'

  # Run time dependencies
  s.add_runtime_dependency 'minitest', '~> 5.4'
  s.add_runtime_dependency 'minitar', '~> 0.6'
  s.add_runtime_dependency 'pry-byebug', '~> 3.4.2'
  # pry-byebug can have issues with native readline libs so add rb-readline
  s.add_runtime_dependency 'rb-readline', '~> 0.5.3'

  s.add_runtime_dependency 'hocon', '~> 1.0'
  s.add_runtime_dependency 'net-ssh', '~> 4.0'
  s.add_runtime_dependency 'net-scp', '~> 1.2'
  s.add_runtime_dependency 'inifile', '~> 3.0'

  s.add_runtime_dependency 'rsync', '~> 1.0.9'
  s.add_runtime_dependency 'open_uri_redirections', '~> 0.2.1'
  s.add_runtime_dependency 'in-parallel', '~> 0.1'
  s.add_runtime_dependency 'thor', '~> 0.19'

  # Run time dependencies that are Beaker libraries
  s.add_runtime_dependency 'stringify-hash', '~> 0.0'
  s.add_runtime_dependency 'beaker-hiera', '~> 0.0'
  s.add_runtime_dependency 'beaker-hostgenerator'
  s.add_runtime_dependency 'beaker-puppet', '~> 0.0'

  # Optional provisioner specific support
  s.add_runtime_dependency 'beaker-docker', '~> 0.1'
  s.add_runtime_dependency 'beaker-aws', '~> 0.1'
  s.add_runtime_dependency 'beaker-abs', '~> 0.4'
  s.add_runtime_dependency 'beaker-vmpooler', '~> 1.0'
  s.add_runtime_dependency 'beaker-google', '~> 0.1'
  s.add_runtime_dependency 'beaker-vagrant', '~> 0.1'
  s.add_runtime_dependency 'beaker-vmware', '~> 0.1'
  s.add_runtime_dependency 'beaker-openstack', '~> 0.1'
  s.add_runtime_dependency 'beaker-vcloud', '~> 0.1'

end

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

@hsbt
Copy link
Member

hsbt commented Jun 15, 2018

Duplicates with #6563

@hsbt hsbt closed this as completed Jun 15, 2018
@Dakta
Copy link
Author

Dakta commented Jun 20, 2018

I'd like to consider reopening this issue, since the underlying problem of corrupted dependency and binstubs paths is unfixed.

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

2 participants