rubygems / bundler

Manage your Ruby application's gem dependencies
https://bundler.io
MIT License
4.88k stars 1.99k forks source link

[1.17] bundler won't upgrade JRuby on Rails 4 to 5 (Windows) #7470

Closed aaronkelton closed 4 years ago

aaronkelton commented 4 years ago

While trying to upgrade JRuby on Rails on Windows from 4.2.11.1 to 5.0.0, I got this error after running bundle update rails. I'm at my wits' end; any suggestions would be greatly appreciated:

Bundler could not find compatible versions for gem "activerecord":
  In Gemfile:
    activerecord-jdbc-adapter java was resolved to 50.5, which depends on
      activerecord (~> 5.0.0, >= 5.0.3) java

    kaminari java was resolved to 1.1.1, which depends on
kaminari-activerecord (= 1.1.1) java was resolved to 1.1.1, which depends
on
        activerecord java

    paper_trail java was resolved to 10.3.1, which depends on
      activerecord (>= 4.2) java

    rails (= 5.0.0) java was resolved to 5.0.0, which depends on
      activerecord (= 5.0.0) java

Here's the output from bundle env:

## Environment

Bundler       1.17.3
  Platforms   ruby, universal-java-1.8
Ruby          2.5.7p0 (2019-10-30 revision 67816) [java]
  Full Path   C:/jruby-9.2.9.0/bin/jruby.exe
  Config Dir  C:/jruby-9.2.9.0/etc
RubyGems      2.7.10
  Gem Home    C:/jruby-9.2.9.0/lib/ruby/gems/shared
  Gem Path    C:/Users/aaron/.gem/jruby/2.5.0;C:/jruby-9.2.9.0/lib/ruby/gems/shared
  User Path   C:/Users/aaron/.gem/jruby/2.5.0
  Bin Dir     C:/jruby-9.2.9.0/bin
Tools
  Git         2.16.2.windows.1
  RVM         not installed
  rbenv       not installed
  chruby      not installed

## Bundler Build Metadata

Built At          2018-12-27
Git SHA           d7089abb6
Released Version  true

## Bundler settings

local.activerecord-jdbc-adapter
  Set for the current user (C:/Users/aaron/.bundle/config): "C:/projects/activerecord-jdbc-adapter-50-stable"
disable_local_branch_check
  Set for the current user (C:/Users/aaron/.bundle/config): true
gem.test
  Set for the current user (C:/Users/aaron/.bundle/config): false
gem.mit
  Set for the current user (C:/Users/aaron/.bundle/config): false
gem.coc
  Set for the current user (C:/Users/aaron/.bundle/config): false
path
  Set for your local app (C:/projects/app/.bundle/config): "vendor"
disable_shared_gems
  Set for your local app (C:/projects/app/.bundle/config): true

Gemfile

source 'http://rubygems.org'

gem 'rails', '5.0.0'
gem 'activerecord'
gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', branch: 'master' # on my local 'master' branch is the only branch on localized 50-stable
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'therubyrhino'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'savon', '2.11.1'
gem 'cancancan'
gem 'bootstrap-sass', '3.3.7'
gem 'font-awesome-rails'
gem 'kaminari'
gem 'simple_form'
gem 'cocoon'
gem 'haml', '5.0.4'
gem 'tilt', '2.0.7'
gem 'haml-rails', '~> 1.0'
gem 'american_date'
gem 'exception_notification'
gem 'jruby-openssl'
gem 'by_star'

group :test do
  gem 'cucumber'
  gem 'cucumber-rails', :require => false
  gem 'rspec-rails'
  gem 'capybara'
  gem 'database_cleaner'
  gem 'faker', '1.7.3'
  gem 'shoulda-matchers'
  gem 'factory_girl_rails', '4.8.0'
  gem 'factory_girl', '4.8.0'
  gem 'poltergeist'
  gem 'capybara-screenshot'
  gem 'email_spec'
  gem 'httparty', '0.11.0'
  gem 'rspec-console'
  gem 'timecop'
end

group :development do
  gem 'puma', '3.12.1'
  gem 'quiet_assets'
  gem 'warbler'
  gem 'bullet'
end

group :development, :test do
  gem 'awesome_print', require: true
  gem 'pry', require: true
  gem 'pry-nav'
end

gem 'letter_opener'
gem 'paper_trail'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'validates_timeliness', '~> 4.0'
gem 'less-rails', '~> 3.0.0'
gem 'net-sftp', '~> 2.1', '>= 2.1.2'

Gemfile.lock

GEM
  remote: http://rubygems.org/
  specs:
    actionmailer (4.2.11)
      actionpack (= 4.2.11)
      actionview (= 4.2.11)
      activejob (= 4.2.11)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.11)
      actionview (= 4.2.11)
      activesupport (= 4.2.11)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (4.2.11)
      activesupport (= 4.2.11)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activejob (4.2.11)
      activesupport (= 4.2.11)
      globalid (>= 0.3.0)
    activemodel (4.2.11)
      activesupport (= 4.2.11)
      builder (~> 3.1)
    activerecord (4.2.11)
      activemodel (= 4.2.11)
      activesupport (= 4.2.11)
      arel (~> 6.0)
    activerecord-jdbc-adapter (1.3.25)
      activerecord (>= 2.2, < 5.0)
    activerecord-jdbcsqlite3-adapter (1.3.25)
      activerecord-jdbc-adapter (~> 1.3.25)
      jdbc-sqlite3 (>= 3.7.2, < 3.9)
    activesupport (4.2.11)
      i18n (~> 0.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    addressable (2.6.0)
      public_suffix (>= 2.0.2, < 4.0)
    akami (1.3.1)
      gyoku (>= 0.4.0)
      nokogiri
    american_date (1.1.1)
    arel (6.0.4)
    autoprefixer-rails (9.6.1)
      execjs
    awesome_print (1.8.0)
    backports (3.15.0)
    bond (0.5.1-java)
    bootstrap-sass (3.3.7)
      autoprefixer-rails (>= 5.2.1)
      sass (>= 3.3.4)
    builder (3.2.3)
    bullet (6.0.2)
      activesupport (>= 3.0.0)
      uniform_notifier (~> 1.11)
    by_star (3.0.0)
      activesupport (> 3)
    cancancan (3.0.1)
    capybara (3.15.1)
      addressable
      mini_mime (>= 0.1.3)
      nokogiri (~> 1.8)
      rack (>= 1.6.0)
      rack-test (>= 0.6.3)
      regexp_parser (~> 1.2)
      xpath (~> 3.2)
    capybara-screenshot (1.0.23)
      capybara (>= 1.0, < 4)
      launchy
    cliver (0.3.2)
    cocoon (1.2.14)
    coderay (1.1.2)
    coffee-rails (4.1.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.1.x)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    commonjs (0.2.7)
    concurrent-ruby (1.1.5)
    crass (1.0.4)
    cucumber (3.1.2)
      builder (>= 2.1.2)
      cucumber-core (~> 3.2.0)
      cucumber-expressions (~> 6.0.1)
      cucumber-wire (~> 0.0.1)
      diff-lcs (~> 1.3)
      gherkin (~> 5.1.0)
      multi_json (>= 1.7.5, < 2.0)
      multi_test (>= 0.1.2)
    cucumber-core (3.2.1)
      backports (>= 3.8.0)
      cucumber-tag_expressions (~> 1.1.0)
      gherkin (~> 5.0)
    cucumber-expressions (6.0.1)
    cucumber-rails (1.8.0)
      capybara (>= 2.12, < 4)
      cucumber (>= 3.0.2, < 4)
      mime-types (>= 2.0, < 4)
      nokogiri (~> 1.8)
      railties (>= 4.2, < 7)
    cucumber-tag_expressions (1.1.1)
    cucumber-wire (0.0.1)
    database_cleaner (1.7.0)
    diff-lcs (1.3)
    email_spec (2.2.0)
      htmlentities (~> 4.3.3)
      launchy (~> 2.1)
      mail (~> 2.7)
    erubis (2.7.0)
    exception_notification (4.4.0)
      actionmailer (>= 4.0, < 7)
      activesupport (>= 4.0, < 7)
    execjs (2.7.0)
    factory_girl (4.8.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.8.0)
      factory_girl (~> 4.8.0)
      railties (>= 3.0.0)
    faker (1.7.3)
      i18n (~> 0.5)
    ffi (1.11.1-java)
    font-awesome-rails (4.7.0.5)
      railties (>= 3.2, < 6.1)
    gherkin (5.1.0)
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    grease (0.3.2)
    gyoku (1.3.1)
      builder (>= 2.1.2)
    haml (5.0.4)
      temple (>= 0.8.0)
      tilt
    haml-rails (1.0.0)
      actionpack (>= 4.0.1)
      activesupport (>= 4.0.1)
      haml (>= 4.0.6, < 6.0)
      html2haml (>= 1.0.1)
      railties (>= 4.0.1)
    html2haml (2.2.0)
      erubis (~> 2.7.0)
      haml (>= 4.0, < 6)
      nokogiri (>= 1.6.0)
      ruby_parser (~> 3.5)
    htmlentities (4.3.4)
    httparty (0.11.0)
      multi_json (~> 1.0)
      multi_xml (>= 0.5.2)
    httpi (2.4.4)
      rack
      socksify
    i18n (0.9.5)
      concurrent-ruby (~> 1.0)
    jdbc-sqlite3 (3.8.11.2)
    jquery-rails (4.3.5)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (6.0.1)
      railties (>= 3.2.16)
    jruby-jars (9.2.8.0)
    jruby-openssl (0.10.2-java)
    jruby-rack (1.1.21)
    kaminari (1.1.1)
      activesupport (>= 4.1.0)
      kaminari-actionview (= 1.1.1)
      kaminari-activerecord (= 1.1.1)
      kaminari-core (= 1.1.1)
    kaminari-actionview (1.1.1)
      actionview
      kaminari-core (= 1.1.1)
    kaminari-activerecord (1.1.1)
      activerecord
      kaminari-core (= 1.1.1)
    kaminari-core (1.1.1)
    launchy (2.4.3-java)
      addressable (~> 2.3)
      spoon (~> 0.0.1)
    less (2.6.0)
      commonjs (~> 0.2.7)
    less-rails (3.0.0)
      actionpack (>= 4.0)
      grease
      less (~> 2.6.0)
      sprockets (> 2, < 4)
      tilt
    letter_opener (1.7.0)
      launchy (~> 2.2)
    loofah (2.2.3)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    method_source (0.9.2)
    mime-types (3.2.2)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2019.0331)
    mini_mime (1.0.2)
    minitest (5.11.3)
    multi_json (1.13.1)
    multi_test (0.1.2)
    multi_xml (0.6.0)
    net-sftp (2.1.2)
      net-ssh (>= 2.6.5)
    net-ssh (5.2.0)
    nokogiri (1.10.4-java)
    nori (2.6.0)
    paper_trail (10.3.1)
      activerecord (>= 4.2)
      request_store (~> 1.1)
    poltergeist (1.18.1)
      capybara (>= 2.1, < 4)
      cliver (~> 0.3.1)
      websocket-driver (>= 0.2.0)
    pry (0.12.2-java)
      coderay (~> 1.1.0)
      method_source (~> 0.9.0)
      spoon (~> 0.0)
    pry-nav (0.3.0)
      pry (>= 0.9.10, < 0.13.0)
    public_suffix (3.1.1)
    puma (3.12.1-java)
    quiet_assets (1.1.0)
      railties (>= 3.1, < 5.0)
    rack (1.6.11)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.11)
      actionmailer (= 4.2.11)
      actionpack (= 4.2.11)
      actionview (= 4.2.11)
      activejob (= 4.2.11)
      activemodel (= 4.2.11)
      activerecord (= 4.2.11)
      activesupport (= 4.2.11)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.11)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.9)
      activesupport (>= 4.2.0, < 5.0)
      nokogiri (~> 1.6)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.2.0)
      loofah (~> 2.2, >= 2.2.2)
    railties (4.2.11)
      actionpack (= 4.2.11)
      activesupport (= 4.2.11)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.5.0)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.0)
      ffi (~> 1.0)
    regexp_parser (1.6.0)
    request_store (1.4.1)
      rack (>= 1.4)
    rspec-console (0.6.1)
      bond
    rspec-core (3.8.2)
      rspec-support (~> 3.8.0)
    rspec-expectations (3.8.4)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.8.0)
    rspec-mocks (3.8.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.8.0)
    rspec-rails (3.8.2)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 3.8.0)
      rspec-expectations (~> 3.8.0)
      rspec-mocks (~> 3.8.0)
      rspec-support (~> 3.8.0)
    rspec-support (3.8.2)
    ruby_parser (3.13.1)
      sexp_processor (~> 4.9)
    rubyzip (1.2.3)
    sass (3.7.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sass-rails (5.0.7)
      railties (>= 4.0.0, < 6)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    savon (2.11.1)
      akami (~> 1.2)
      builder (>= 2.1.2)
      gyoku (~> 1.2)
      httpi (~> 2.3)
      nokogiri (>= 1.4.0)
      nori (~> 2.4)
      wasabi (~> 3.4)
    sexp_processor (4.12.1)
    shoulda-matchers (4.0.1)
      activesupport (>= 4.2.0)
    simple_form (4.0.0)
      actionpack (> 4)
      activemodel (> 4)
    socksify (1.7.1)
    spoon (0.0.6)
      ffi
    sprockets (3.7.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    temple (0.8.2)
    therubyrhino (2.1.2)
      therubyrhino_jar (>= 1.7.4, < 1.7.9)
    therubyrhino_jar (1.7.8)
    thor (0.20.3)
    thread_safe (0.3.6-java)
    tilt (2.0.7)
    timecop (0.9.1)
    timeliness (0.4.3)
    tzinfo (1.2.5)
      thread_safe (~> 0.1)
    tzinfo-data (1.2019.2)
      tzinfo (>= 1.0.0)
    uglifier (4.1.20)
      execjs (>= 0.3.0, < 3)
    uniform_notifier (1.13.0)
    validates_timeliness (4.1.1)
      timeliness (>= 0.3.10, < 1)
    warbler (2.0.5)
      jruby-jars (>= 9.0.0.0)
      jruby-rack (>= 1.1.1, < 1.3)
      rake (>= 10.1.0)
      rubyzip (~> 1.0, < 1.4)
    wasabi (3.5.0)
      httpi (~> 2.0)
      nokogiri (>= 1.4.2)
    websocket-driver (0.7.1-java)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.4)
    xpath (3.2.0)
      nokogiri (~> 1.8)

PLATFORMS
  java

DEPENDENCIES
  activerecord-jdbcsqlite3-adapter (~> 1.3)
  american_date
  awesome_print
  bootstrap-sass (= 3.3.7)
  bullet
  by_star
  cancancan
  capybara
  capybara-screenshot
  cocoon
  coffee-rails (~> 4.1.0)
  cucumber
  cucumber-rails
  database_cleaner
  email_spec
  exception_notification
  factory_girl (= 4.8.0)
  factory_girl_rails (= 4.8.0)
  faker (= 1.7.3)
  font-awesome-rails
  haml (= 5.0.4)
  haml-rails (~> 1.0)
  httparty (= 0.11.0)
  jquery-rails
  jquery-ui-rails
  jruby-openssl
  kaminari
  less-rails (~> 3.0.0)
  letter_opener
  net-sftp (~> 2.1, >= 2.1.2)
  paper_trail
  poltergeist
  pry
  pry-nav
  puma (= 3.12.1)
  quiet_assets
  rails (= 4.2.11)
  rspec-console
  rspec-rails
  sass-rails (~> 5.0)
  savon (= 2.11.1)
  shoulda-matchers
  simple_form
  therubyrhino
  tilt (= 2.0.7)
  timecop
  tzinfo-data
  uglifier (>= 1.3.0)
  validates_timeliness (~> 4.0)
  warbler

BUNDLED WITH
   1.17.3

gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 2.7.10
  - RUBY VERSION: 2.5.7 (2019-10-30 patchlevel 0) [java]
  - INSTALLATION DIRECTORY: C:/jruby-9.2.9.0/lib/ruby/gems/shared
  - USER INSTALLATION DIRECTORY: C:/Users/aaron/.gem/jruby/2.5.0
  - RUBY EXECUTABLE: C:/jruby-9.2.9.0/bin/jruby.exe
  - EXECUTABLE DIRECTORY: C:/jruby-9.2.9.0/bin
  - SPEC CACHE DIRECTORY: C:/Users/aaron/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: C:/jruby-9.2.9.0/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-java-1.8
  - GEM PATHS:
     - C:/jruby-9.2.9.0/lib/ruby/gems/shared
     - C:/Users/aaron/.gem/jruby/2.5.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "install" => "--no-rdoc --no-ri --env-shebang"
     - "update" => "--no-rdoc --no-ri --env-shebang"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - C:\jruby-9.2.9.0\bin
     - C:\Program Files\ConEmu\ConEmu\Scripts
     - C:\Windows\system32
     - C:\Windows
     - C:\Windows\System32\Wbem
     - C:\Windows\System32\WindowsPowerShell\v1.0\
     - C:\Program Files\Citrix\System32\
     - C:\Program Files\Citrix\ICAService\
     - C:\Program Files\Citrix\Virtual Desktop Agent\
     - C:\Program Files\Git\cmd
     - C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\
     - C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\
     - C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\
     - C:\Program Files\Microsoft SQL Server\120\Tools\Binn\
     - C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\
     - C:\Program Files\Microsoft SQL Server\120\DTS\Binn\
     - C:\Program Files\TortoiseGit\bin
     - C:\Program Files\dotnet\
     - C:\Program Files\Microsoft SQL Server\130\Tools\Binn\
     - C:\Program Files\1E\NomadBranch\
     - C:\Program Files\nodejs\10.15.3
     - C:\Program Files\ConEmu

And for what it's worth, gem install rails -v 5.0.0 and rails -v:

Successfully installed rails-5.0.0
1 gem installed
...
Could not find gem 'rails (= 5.0.0) java' in any of the gem sources listed in your Gemfile or in gems cached in vendor/cache.
aaronkelton commented 4 years ago

This issue was due to my Gemfile's Rails version being pinned at 5.0.0, and the dependency was for 5.0.3. 😬

I should have read the error message more closely. I looked at the squiggly and thought "Oh, 5.0.0 should be fine here." When in reality it meant "Don't go above 5.x but definitely no less than 5.0.3". I bumped my Gemfile Rails to 5.0.3 and got past the issue.

  In Gemfile:
    activerecord-jdbc-adapter java was resolved to 50.5, which depends on
      activerecord (~> 5.0.0, >= 5.0.3) java