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

Bundler resolves wrong depedency version #5444

Closed
miks opened this issue Feb 18, 2017 · 10 comments · Fixed by #5443
Closed

Bundler resolves wrong depedency version #5444

miks opened this issue Feb 18, 2017 · 10 comments · Fixed by #5443

Comments

@miks
Copy link

miks commented Feb 18, 2017

Running bundle install with bundler version 1.14.4 I'm getting:

    releaf was resolved to 1.0.8, which depends on
      releaf-core (= 1.0.8) was resolved to 1.0.8, which depends on
        railties (~> 4.2.7.1) was resolved to 4.2.7.1, which depends on
          actionpack (= 4.2.7.1) was resolved to 4.2.7.1, which depends on
            activesupport (= 5.0.1)

    releaf was resolved to 1.0.8, which depends on
      releaf-core (= 1.0.8) was resolved to 1.0.8, which depends on
        railties (~> 4.2.7.1) was resolved to 4.2.7.1, which depends on
          activesupport (= 4.2.7.1)

Where in fact actionpack 4.2.7.1 depends on activesupport 4.2.7.1 (https://rubygems.org/gems/actionpack/versions/4.2.7.1)

Possible related with #5095

Bundler 1.13.6 is working correctly. I got this error on travis-ci where latest (1.14.4) version is used.

@colby-swandale
Copy link
Member

Can you please share the output of bundle env

@miks
Copy link
Author

miks commented Feb 18, 2017

Environment

Bundler   1.14.4
Rubygems  2.5.1
Ruby      2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]
GEM_HOME  /Users/miks/.rvm/gems/ruby-2.3.1
GEM_PATH  /Users/miks/.rvm/gems/ruby-2.3.1:/Users/miks/.rvm/gems/ruby-2.3.1@global
RVM       1.27.0 (master)
Git       2.10.1 (Apple Git-78)
Platform  x86_64-darwin-16
rubygems-bundler (1.4.4)

## Gemfile

### Gemfile

```ruby
source "http://rubygems.org"
require 'yaml'

config_file = File.expand_path('../config.yml', __FILE__)
unless File.exist?(config_file)
  puts "config.yml is missing"
  puts "see CONTRIBUTING.md"
  exit(1)
end

config = YAML.load_file(config_file)

# Declare your gem's dependencies in releaf.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec

# gems re-listed for correct dummy app working

# Declare any dependencies that are still in development here instead of in
# your gemspec. These might include edge Rails or gems from your path or
# Git. Remember to move these dependencies to your gemspec before releasing
# your gem to rubygems.org.

# To use debugger
# gem 'debugger'


case config["database"]["type"]
when 'mysql'
  gem 'mysql2', platform: :ruby
when 'postgresql'
  gem 'pg'
end

group :documentation do
  gem 'yard'
  gem 'github-markdown', '>= 0.5.3', platforms: :ruby
  gem 'redcarpet', '>= 2.2.2', platforms: :ruby
  gem 'yard-activerecord', '~> 0.0.14'
end

Gemfile.lock

<No /Users/miks/code/releaf/Gemfile.lock found>

Gemspecs

releaf.gemspec

require File.expand_path('lib/releaf/version', __dir__)
require File.expand_path('lib/releaf/gems', __dir__)

Gem::Specification.new do |s|
  s.name        = "releaf"
  s.version     = Releaf::VERSION

  s.summary     = "Administration interface for Ruby on Rails"
  s.description = "Administration interface for Ruby on Rails"
  s.authors     = ["CubeSystems"]
  s.email       = '[email protected]'
  s.homepage    = 'https://github.com/cubesystems/releaf'
  s.require_paths = %w(lib)
  s.license     = "MIT"

  s.files       = Dir["lib/**/*"] + ["LICENSE"]
  s.test_files  = Dir["spec/factories/**/*"] + Dir["spec/support/**/*"] + Dir["spec/*.rb"]

  Releaf::GEMS.each do|gem|
    s.add_dependency gem, Releaf::VERSION
  end

  s.add_development_dependency 'rspec-rails'
  s.add_development_dependency 'capybara'
  s.add_development_dependency 'poltergeist'
  s.add_development_dependency 'factory_girl_rails'
  s.add_development_dependency 'syntax'
  s.add_development_dependency 'simplecov'
  s.add_development_dependency 'simplecov-rcov'
  s.add_development_dependency 'database_cleaner'
  s.add_development_dependency 'shoulda-matchers', '~> 2.8'
  s.add_development_dependency 'db-query-matchers'
  s.add_development_dependency 'coveralls'
  s.add_development_dependency 'timecop'
  s.add_development_dependency 'with_model'
  s.add_development_dependency 'pry'
  s.add_development_dependency 'pry-nav'
  s.add_development_dependency 'roo'

  s.required_ruby_version = '>= 2.2.0'
end

@olleolleolle
Copy link
Member

@miks Does it do the right thing with latest Rubygems installed? gem update --system?

@miks
Copy link
Author

miks commented Feb 18, 2017

Yes, it's same with 2.6.10.
I discovered this while travis-ci started to fail (https://travis-ci.org/cubesystems/releaf/jobs/202733080).
I wasn't able to reproduce errors locally until upgraded bundler to latest version.

@segiddins
Copy link
Member

Can you see if master, which includes #5443, resolves properly? Thanks!

@miks
Copy link
Author

miks commented Feb 18, 2017

What's proper way to install gem from github branch? With tool like specific_install?

@miks
Copy link
Author

miks commented Feb 18, 2017

I installed latest version from master branch with specific_install, output is little bit different now:

Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    activesupport (= 5.0.1)

    activesupport (= 5.0.1)

    activesupport (= 5.0.1)

    activesupport (= 5.0.1)

    activesupport (= 5.0.1)

    rails-dom-testing (~> 2.0) was resolved to 2.0.2, which depends on
      activesupport (< 6.0, >= 4.2.0)

    releaf was resolved to 1.0.8, which depends on
      releaf-core (= 1.0.8) was resolved to 1.0.8, which depends on
        railties (~> 4.2) was resolved to 4.2.0, which depends on
          activesupport (= 4.2.0)

    releaf was resolved to 1.0.8, which depends on
      releaf-core (= 1.0.8) was resolved to 1.0.8, which depends on
        railties (~> 4.2) was resolved to 4.2.0, which depends on
          activesupport (= 4.2.0)

    rspec-rails was resolved to 3.5.2, which depends on
      activesupport (>= 3.0)

    shoulda-matchers (~> 2.8) was resolved to 2.8.0, which depends on
      activesupport (>= 3.0.0)

    shoulda-matchers (~> 2.8) was resolved to 2.8.0, which depends on
      activesupport (>= 3.0.0)

@segiddins
Copy link
Member

Ugh thanks, guess I'll have to see why the resolver is choking on this 😔

@miks
Copy link
Author

miks commented Feb 18, 2017

I don't understand this https://travis-ci.org/cubesystems/releaf/jobs/202965587
I tried locally latest bundler version (with gem specific_install https://github.com/bundler/bundler.git), but got same error while on travis-ci it's working now.
How it's possible?

@segiddins
Copy link
Member

Can confirm this is fixed on master

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

Successfully merging a pull request may close this issue.

4 participants