Skip to content

Instantly share code, notes, and snippets.

@isen0011
Created August 11, 2017 17:13
Show Gist options
  • Save isen0011/02007020a715bffc46d7558fd6b7570c to your computer and use it in GitHub Desktop.
Save isen0011/02007020a715bffc46d7558fd6b7570c to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
set +e
ISSUE=source-order
ROOT_DIR=/tmp/repro-$ISSUE
REPO_DIR=$ROOT_DIR/repo
mkdir -p $ROOT_DIR
rm -rf $REPO_DIR
mkdir -p $REPO_DIR
cd $REPO_DIR
echo '2.4.1' > .ruby-version
bundle env
# Bundler 1.15.3
# Rubygems 2.6.11
# Ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
# Bundler settings
# path
# Set for the current user (/Users/isen0011/.bundle/config): "./bundle"
# ignore_messages
# Set for the current user (/Users/isen0011/.bundle/config): true
# artifactory.umn.edu
# Set for the current user (/Users/isen0011/.bundle/config): "isen0011:SECURE_KEY"
# disable_shared_gems
# Set for your local app (/Users/isen0011/sites/gpa_calculator/.bundle/config): true
# setup broken Gemfile
cat >Gemfile <<EOL
source 'https://rubygems.org' do
ruby '2.4.1'
gem 'rails', '~> 5.1.2'
end
source "https://artifactory.umn.edu/artifactory/api/gems/asr-rubygems/" do
gem "lastpassify"
end
EOL
# attempt to bundle, see it fail because it tries to pull minitest from artifactory
bundle install
#--- OUT ---
# ...
# Gem::RemoteFetcher::FetchError: too many connection resets
# (https://isen0011:[email protected]/artifactory/api/gems/asr-rubygems/gems/minitest-5.10.3.gem)
# An error occurred while installing minitest (5.10.3), and Bundler cannot continue.
# Make sure that `gem install minitest -v '5.10.3'` succeeds before bundling.
#
# In Gemfile:
# rails was resolved to 5.1.3, which depends on
# actioncable was resolved to 5.1.3, which depends on
# actionpack was resolved to 5.1.3, which depends on
# actionview was resolved to 5.1.3, which depends on
# rails-dom-testing was resolved to 2.0.3, which depends on
# activesupport was resolved to 5.1.3, which depends on
# minitest
#--- /OUT ---
# setup working Gemfile
cat >Gemfile <<EOL
source "https://artifactory.umn.edu/artifactory/api/gems/asr-rubygems/" do
gem "lastpassify"
end
source 'https://rubygems.org' do
ruby '2.4.1'
gem 'rails', '~> 5.1.2'
end
EOL
# re-run bundle, see it work!
bundle install
#--- OUT ---
# ...
# Installing rails 5.1.3
# Bundle complete! 2 Gemfile dependencies, 39 gems now installed.
# Bundled gems are installed into ./bundle.
#--- /OUT ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment