fastlane-community / xcov

Nice code coverage reporting without hassle
MIT License
556 stars 107 forks source link

uninitialized constant Gem::BundlerVersionFinder (NameError) #126

Open ProudOfZiggy opened 6 years ago

ProudOfZiggy commented 6 years ago

I've add xcov into my Gemfile:

gem "appium_lib"
gem "rspec"
gem "rspec-rails"
gem "rake"
gem "fabrication"
gem "ffaker"
gem "fastlane"
gem 'cocoapods'
gem 'rspec_junit_formatter'
gem 'pry'
gem 'rest-client'
gem 'json'
gem 'google_drive'
gem 'xcov'

Then I'm doing bundle install to install a Gems.

But xcov is just not working when I'm trying to use it. Its failing with this error:

Traceback (most recent call last):
    22: from /usr/local/bin/xcov:23:in `<main>'
    21: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems.rb:309:in `activate_bin_path'
    20: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems.rb:309:in `synchronize'
    19: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems.rb:311:in `block in activate_bin_path'
    18: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems.rb:239:in `finish_resolve'
    17: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:88:in `require'
    16: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:1107:in `find_in_unresolved_tree'
    15: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:1107:in `each'
    14: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:1108:in `block in find_in_unresolved_tree'
    13: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:2651:in `traverse'
    12: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:2651:in `each'
    11: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:2653:in `block in traverse'
    10: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/dependency.rb:302:in `to_specs'
     9: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/dependency.rb:283:in `matching_specs'
     8: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:88:in `require'
     7: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:1107:in `find_in_unresolved_tree'
     6: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:1107:in `each'
     5: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:1108:in `block in find_in_unresolved_tree'
     4: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:2651:in `traverse'
     3: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:2651:in `each'
     2: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/specification.rb:2653:in `block in traverse'
     1: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/dependency.rb:302:in `to_specs'
/usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/rubygems/dependency.rb:283:in `matching_specs': uninitialized constant Gem::BundlerVersionFinder (NameError)

Any suggestions?

nakiostudio commented 6 years ago

Hi @ProudOfZiggy 👋

That usually happens when something goes wrong fetching a gem during bundle install. Could you try running the following?

gem cleanup
gem install bundler
bundle install
ProudOfZiggy commented 6 years ago

@nakiostudio

It's starts working after gem cleanup

But then, after

gem install bundler
bundle install

I have the same error.