Skip to content

Instantly share code, notes, and snippets.

@iwz
Last active December 4, 2019 22:46
Show Gist options
  • Save iwz/247640c88af7e5bcd962a51654d904f9 to your computer and use it in GitHub Desktop.
Save iwz/247640c88af7e5bcd962a51654d904f9 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
mkdir -p /tmp/repro-7468
cd /tmp/repro-7468
bundle env
# Bundler 2.0.2
# Ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
# Rubygems 3.0.3
# GEM_HOME
# Bundler settings
# jobs
# Set for the current user (/Users/iwz/.bundle/config): 7
# build.mysql2
# Set for the current user (/Users/iwz/.bundle/config): "--with-opt-dir=/usr/local/opt/openssl@1.1"
# build.libxml-ruby
# Set for the current user (/Users/iwz/.bundle/config): "--with-xml2-include=/usr/local/opt/libxml2/include/libxml2"
cat > Gemfile <<EOF
source "https://rubygems.org"
gem "data_migrate"
gem "rails", "~> 6.0"
gem "resque-scheduler-web"
EOF
cat > Gemfile.lock <<EOF
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.4)
actionpack (= 5.2.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4)
actionpack (= 5.2.4)
actionview (= 5.2.4)
activejob (= 5.2.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4)
actionview (= 5.2.4)
activesupport (= 5.2.4)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.4)
activesupport (= 5.2.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.4)
activesupport (= 5.2.4)
globalid (>= 0.3.6)
activemodel (5.2.4)
activesupport (= 5.2.4)
activerecord (5.2.4)
activemodel (= 5.2.4)
activesupport (= 5.2.4)
arel (>= 9.0)
activestorage (5.2.4)
actionpack (= 5.2.4)
activerecord (= 5.2.4)
marcel (~> 0.3.1)
activesupport (5.2.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (9.0.0)
builder (3.2.3)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
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.5)
data_migrate (6.1.0)
rails (>= 5.0)
erubi (1.9.0)
et-orbi (1.2.2)
tzinfo
execjs (2.7.0)
ffi (1.11.1)
font-awesome-sass (5.8.1)
sassc (>= 1.11)
fugit (1.3.3)
et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.7.0)
concurrent-ruby (~> 1.0)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
less (2.6.0)
commonjs (~> 0.2.7)
less-rails (2.8.0)
actionpack (>= 4.0)
less (~> 2.6.0)
sprockets (> 2, < 4)
tilt
loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.13.0)
mono_logger (1.1.0)
multi_json (1.14.1)
mustermann (1.0.3)
nio4r (2.5.2)
nokogiri (1.10.7)
mini_portile2 (~> 2.4.0)
raabro (1.1.6)
rack (2.0.7)
rack-protection (2.0.7)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4)
actioncable (= 5.2.4)
actionmailer (= 5.2.4)
actionpack (= 5.2.4)
actionview (= 5.2.4)
activejob (= 5.2.4)
activemodel (= 5.2.4)
activerecord (= 5.2.4)
activestorage (= 5.2.4)
activesupport (= 5.2.4)
bundler (>= 1.3.0)
railties (= 5.2.4)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.4)
actionpack (= 5.2.4)
activesupport (= 5.2.4)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.3)
redis (4.1.3)
redis-namespace (1.6.0)
redis (>= 3.0.4)
resque (1.27.4)
mono_logger (~> 1.0)
multi_json (~> 1.0)
redis-namespace (~> 1.3)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
resque-scheduler (4.4.0)
mono_logger (~> 1.0)
redis (>= 3.3)
resque (>= 1.26)
rufus-scheduler (~> 3.2)
resque-scheduler-web (1.1.0)
resque-scheduler (~> 4.0)
resque-web (~> 0.0.8)
resque-web (0.0.12)
coffee-rails
font-awesome-sass
jquery-rails
resque
sass-rails
twitter-bootstrap-rails
rufus-scheduler (3.6.0)
fugit (~> 1.1, >= 1.1.6)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.0.1)
ffi (~> 1.9)
rake
sassc-rails (2.1.1)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
sinatra (2.0.7)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.7)
tilt (~> 2.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.10)
twitter-bootstrap-rails (4.0.0)
actionpack (~> 5.0, >= 5.0.1)
execjs (~> 2.7)
less-rails (~> 2.8, >= 2.8.0)
railties (~> 5.0, >= 5.0.1)
tzinfo (1.2.5)
thread_safe (~> 0.1)
vegas (0.1.11)
rack (>= 1.0.0)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
PLATFORMS
ruby
DEPENDENCIES
data_migrate
rails (~> 5.2)
resque-scheduler-web
BUNDLED WITH
2.0.2
EOF
# Expected behaviour: setting a gem to a new version range shouldn't fail
# when setting a specific version in that range passes
# Observed behaviour: bundler presents misleading information about not being
# able to find a compatible version of rails for data_migrate, even though it
# requires >= 5.0, so it should be compatible
# OUTPUT:
# Bundler could not find compatible versions for gem "actionpack":
# In Gemfile:
# resque-scheduler-web was resolved to 1.1.0, which depends on
# resque-web (~> 0.0.8) was resolved to 0.0.12, which depends on
# twitter-bootstrap-rails was resolved to 4.0.0, which depends on
# less-rails (>= 2.8.0, ~> 2.8) was resolved to 2.8.0, which depends on
# actionpack (>= 4.0)
# rails (~> 6.0) was resolved to 6.0.1.rc1, which depends on
# actionpack (= 6.0.1.rc1)
# resque-scheduler-web was resolved to 1.1.0, which depends on
# resque-web (~> 0.0.8) was resolved to 0.0.12, which depends on
# twitter-bootstrap-rails was resolved to 4.0.0, which depends on
# actionpack (~> 5.0, >= 5.0.1)
# Bundler could not find compatible versions for gem "rails":
# In Gemfile:
# rails (~> 6.0)
# data_migrate was resolved to 6.1.0, which depends on
# rails (>= 5.0)
bundle update rails
echo 'Change rails version from "~> 6.0" to "6.0.1"'
cat > Gemfile <<EOF
source "https://rubygems.org"
gem "data_migrate"
gem "rails", "6.0.1"
gem "resque-scheduler-web"
EOF
bundle update rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment