Skip to content

[TEMP] Debug bundle install issues #2369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 1 addition & 56 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,7 @@ sudo: required
addons:
chrome: stable

# We deviate from the rspec-dev cache setting here.
#
# Travis has special bundler support where it knows to run `bundle clean`
# before backing up the bundle so it doesn't grow indefinitely.
#
# For the other repos we changed to specifying the directory specifically to
# avoid the `bundle clean` travis was doing, because Myron found that, when
# running one of the a build for one repo, the "run the rspec-core and
# rspec-rails spec suites" parts would take a while because it would _always_
# have to install fresh gems (they weren't in the cache). This was happening
# because travis was running `bundle clean` (due to the previous `cache:
# bundler` config) against one repo which was was pruning gems installed for
# the other repos.
#
# In our case, we aren't running the spec suites for the other repos so the
# original `cache: bundler` is a better option.
cache: bundler

bundler_args: "--binstubs --path ../bundle --retry=3 --jobs=3"
bundler_args: "--binstubs --path ../bundle --retry=3 --jobs=3 --verbose"

before_install:
- script/install_chrome_driver
Expand All @@ -45,39 +27,6 @@ matrix:
- RAILS_VERSION='~> 6.0.0'
- JRUBY_OPT=--dev
- JAVA_OPTS="--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED"
- rvm: 2.7.1
env: RAILS_VERSION='~> 6.0.0'
- rvm: 2.6.6
env: RAILS_VERSION='~> 6.0.0'
- rvm: 2.5.8
env: RAILS_VERSION='~> 6.0.0'

# Rails 5.2 builds >= 2.2.2
- rvm: jruby-head
jdk: oraclejdk11
env:
- RAILS_VERSION='~> 5.2.0'
- JRUBY_OPT=--dev
- JAVA_OPTS="--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED"
- rvm: 2.6.6
env: RAILS_VERSION='~> 5.2.0'
- rvm: 2.5.8
env: RAILS_VERSION='~> 5.2.0'
- rvm: 2.4.10
env: RAILS_VERSION='~> 5.2.0'
- rvm: 2.3.8
env: RAILS_VERSION='~> 5.2.0'
- rvm: 2.2.10
env: RAILS_VERSION='~> 5.2.0'
allow_failure: true
- rvm: 2.2.10
env: RAILS_VERSION='5-2-stable'

# Rails 5.1 Builds >= 2.2.2
- rvm: 2.6.6
env: RAILS_VERSION='~> 5.1.0'
- rvm: 2.5.8
env: RAILS_VERSION='~> 5.1.0'
- rvm: 2.4.10
env: RAILS_VERSION='~> 5.1.0'
- rvm: 2.3.8
Expand All @@ -86,10 +35,6 @@ matrix:
env: RAILS_VERSION='~> 5.1.0'

# Rails 5.0 Builds >= 2.2.2
- rvm: 2.6.6
env: RAILS_VERSION='~> 5.0.0'
- rvm: 2.5.8
env: RAILS_VERSION='~> 5.0.0'
- rvm: 2.4.10
env: RAILS_VERSION='~> 5.0.0'
- rvm: 2.3.8
Expand Down
6 changes: 1 addition & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,8 @@ gem 'rake', '~> 12'

gem 'mime-types', "~> 3"

if RUBY_VERSION.to_f < 2.3
if RUBY_VERSION.to_f == 2.2
gem 'capybara', '~> 3.1.0'
elsif RUBY_VERSION.to_f < 2.4
gem 'capybara', '< 3.16'
elsif RUBY_VERSION.to_f < 2.5
gem 'capybara', '< 3.33'
else
gem 'capybara', '>= 2.13', '< 4.0', require: false
end
Expand Down
3 changes: 1 addition & 2 deletions Gemfile-rails-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ when /stable$/
gem_list = %w[rails railties actionmailer actionpack activerecord activesupport activejob actionview]
gem 'puma', "3.12.1" if version > '5-0-stable'
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', platforms: [:jruby]
gem "sprockets", '~> 3.0' if RUBY_VERSION < '2.5'

gem_list.each do |rails_gem|
gem rails_gem, :git => "https://github.com/rails/rails.git", :branch => version
Expand All @@ -29,7 +28,7 @@ when nil, false, ""
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
else
gem "rails", version
gem "sprockets", '~> 3.0' if RUBY_VERSION < '2.5'

gem "puma" if version >= '5-1-stable'

if version.gsub(/[^\d\.]/,'').to_f >= 6.0
Expand Down
2 changes: 1 addition & 1 deletion Thorfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Version < Thor
def use(version)
remove_file "Gemfile.lock"
run "echo '#{version}' > ./.rails-version"
run "bundle install --binstubs"
run "bundle install --verbose --binstubs"
end

desc "which", "print out the configured rails version"
Expand Down
11 changes: 0 additions & 11 deletions example_app_generator/generate_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,11 @@
gsub_file "Gemfile", /.*rails-controller-testing.*/, "gem 'rails-controller-testing', git: 'https://github.com/rails/rails-controller-testing'"
end

if RUBY_VERSION < "2.3.0"
gsub_file "Gemfile", /.*childprocess.*/, "gem 'childprocess', '< 2.0.0'"
gsub_file "Gemfile", /.*i18n.*/, "gem 'i18n', '< 1.5.2'"
gsub_file "Gemfile", /.*nio4r.*/, "gem 'nio4r', '< 2.4.0'"
gsub_file "Gemfile", /.*public_suffix.*/, "gem 'public_suffix', '< 4.0.0'"
gsub_file "Gemfile", /.*rack.*/, "gem 'rack', '< 2.2.0', '!= 2.1.0'"
gsub_file "Gemfile", /.*xpath.*/, "gem 'xpath', '< 3.2.0'"
end

if Rails::VERSION::STRING >= "5.1.0"
if RUBY_VERSION < "2.3"
gsub_file "Gemfile", /.*capybara.*/, "gem 'capybara', '~> 3.1.0'"
elsif RUBY_VERSION < "2.4"
gsub_file "Gemfile", /.*capybara.*/, "gem 'capybara', '~> 3.15.0'"
elsif RUBY_VERSION < "2.5"
gsub_file "Gemfile", /.*capybara.*/, "gem 'capybara', '~> 3.32.0'"
end
if Rails::VERSION::STRING >= "5.2.0"
gsub_file "Gemfile", /.*chromedriver-helper.*/, "gem 'webdrivers', '< 4.0.0'"
Expand Down
4 changes: 2 additions & 2 deletions example_app_generator/travis_retry_bundle_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source FUNCTIONS_SCRIPT_FILE

echo "Starting bundle install using shared bundle path"
if is_mri; then
travis_retry eval "RUBYOPT=$RUBYOPT:' --enable rubygems' bundle install --gemfile ./Gemfile --path REPLACE_BUNDLE_PATH --retry=3 --jobs=3"
travis_retry eval "RUBYOPT=$RUBYOPT:' --enable rubygems' bundle install --verbose --gemfile ./Gemfile --path REPLACE_BUNDLE_PATH --retry=3 --jobs=3"
else
travis_retry eval "bundle install --gemfile ./Gemfile --path REPLACE_BUNDLE_PATH --retry=3 --jobs=3"
travis_retry eval "bundle install --verbose --gemfile ./Gemfile --path REPLACE_BUNDLE_PATH --retry=3 --jobs=3"
fi
2 changes: 1 addition & 1 deletion script/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function run_spec_suite_for {
pushd ../$1
unset BUNDLE_GEMFILE
bundle_install_flags=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"`
travis_retry eval "(unset RUBYOPT; exec bundle install $bundle_install_flags)"
travis_retry eval "(unset RUBYOPT; exec bundle install --verbose $bundle_install_flags)"
run_specs_and_record_done
popd
else
Expand Down