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

Show original error and backtrace directly on bundle install errors instead of a more brittle gem install hint #4778

Merged
merged 2 commits into from
Jul 25, 2021

Conversation

deivid-rodriguez
Copy link
Member

What was the end-user or developer problem that led to this PR?

When bundle install fails to install a specific gem (most common case, extension compilation fails), it will suggest and alternative gem install command that might make it easier to figure out the culprit. However, it's hard to reproduce the exact environment where the installation failed as a fresh pristine command, and sometimes the suggested gem install command will succeed while bundle install will keep failing.

What is your fix for the problem, implemented in this PR?

My fix is to completely remove the gem install suggestion and show the original error with a backtrace instead.

Fixes #3321.

Make sure the following tasks are checked

For example, due to extension compilation issues.
A fresh `gem install` might not reproduce the exact `bundle install`
environment that originally caused the error. It also makes it harder
for the user to troubleshoot the error since she needs to run a separate
command.

Instead, show the original error and backtrace directly.
@deivid-rodriguez deivid-rodriguez merged commit 1462d5c into master Jul 25, 2021
@deivid-rodriguez deivid-rodriguez deleted the remove_gem_install_hint_on_errors branch July 25, 2021 10:32
deivid-rodriguez added a commit that referenced this pull request Jul 30, 2021
Show original error and backtrace directly on `bundle install` errors instead of a more brittle `gem install` hint

(cherry picked from commit 1462d5c)
deivid-rodriguez added a commit that referenced this pull request Jul 30, 2021
Show original error and backtrace directly on `bundle install` errors instead of a more brittle `gem install` hint

(cherry picked from commit 1462d5c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error "An error occurred while installing" does not have clean command
2 participants