Skip to content
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

Prevent uninstalling bundler on newer rails #2158

Merged
merged 3 commits into from Aug 23, 2019
Merged

Prevent uninstalling bundler on newer rails #2158

merged 3 commits into from Aug 23, 2019

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented Aug 19, 2019

No description provided.

@benoittgt
Copy link
Member

Welcome back @JonRowe!

CI failure seems unrelated. LGTM

@benoittgt
Copy link
Member

What the ...

$ script/downgrade_bundler_on_old_rails
Warning dowgrading to older version of Bundler
Removing bundler
Successfully uninstalled bundler-2.0.2
ERROR:  While executing gem ... (Gem::InstallError)
    gem "bundler" cannot be uninstalled because it is a default gem
The command "script/downgrade_bundler_on_old_rails" failed and exited with 1 during .

https://travis-ci.org/rspec/rspec-rails/jobs/574205506

It is inconsistent.

Screenshot 2019-08-21 at 07 45 34

I also noticed we should use 2.4.6 instead of 2.4.4.

Locally with the script I have weird results:

$ script/update_rubygems_and_install_bundler
....
Fetching bundler-2.0.2.gem
Successfully installed bundler-2.0.2
Parsing documentation for bundler-2.0.2
....
1 gem installed

$ script/downgrade_bundler_on_old_rails
Warning dowgrading to older version of Bundler    <<<<< typo? :)
Removing bundler
Successfully uninstalled bundler-2.0.2
Gem 'bundler' is not installed    <<<<< This is the difference. The CI say "ERROR:  While executing gem ... (Gem::InstallError)"
Fetching bundler-1.17.3.gem
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Installing ri documentation for bundler-1.17.3
Done installing documentation for bundler after 4 seconds
1 gem installed

I'm gonna try to run the Travis build locally.

@benoittgt
Copy link
Member

benoittgt commented Aug 21, 2019

Also the warning is bizarre but yes we raise an Gem::InstallError when we uninstall https://github.com/rubygems/rubygems/blob/0ff39e76462b5f27fe0fd82a3f7b397a4becb538/lib/rubygems/uninstaller.rb#L108-L110

I have no idea why we see a succeed than a failure.

I open: rubygems/rubygems#2892

@benoittgt
Copy link
Member

benoittgt commented Aug 21, 2019

Maybe we should look into Travis instead. Their is few solution here travis-ci/travis-ci#8717

One proposal is to use rvm to delete bundler

markets/invisible_captcha@0494554#diff-354f30a63fb0907d4ad57269548329e3R19-R21

For this one I did a try but it fails https://travis-ci.org/rspec/rspec-rails/jobs/574914829

@JonRowe JonRowe force-pushed the fix-build branch 2 times, most recently from 3c935b6 to c07aafb Compare August 23, 2019 18:46
@benoittgt
Copy link
Member

Good catch with Ruby 2.3. I didn't saw it was even mentioned in the comment. 🤞

@JonRowe JonRowe merged commit 4eeb9ac into master Aug 23, 2019
@JonRowe JonRowe deleted the fix-build branch August 23, 2019 20:47
JonRowe added a commit that referenced this pull request Aug 23, 2019
Prevent uninstalling bundler on newer rails
@benoittgt
Copy link
Member

Thanks a lot Jon 🙏

JonRowe added a commit that referenced this pull request Aug 23, 2019
Prevent uninstalling bundler on newer rails
alpaca-tc pushed a commit to alpaca-tc/rspec-rails that referenced this pull request Aug 25, 2019
Prevent uninstalling bundler on newer rails
JonRowe added a commit that referenced this pull request Oct 3, 2019
Prevent uninstalling bundler on newer rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants