This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #5336 - bundler:seg-installation-failure-reason, r=indi…
…rect [ParallelInstaller] Print out why a gem needed to be installed if ins… …tallation fails I think this will close #5078 by making it easier to understand why a gem needed to be installed, especially in the case when the user can't just look in the lockfile
- Loading branch information
Showing
4 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
require "spec_helper" | ||
|
||
RSpec.describe "bundle install" do | ||
context "installing a gem fails" do | ||
it "prints out why that gem was being installed" do | ||
build_repo2 do | ||
build_gem "activesupport", "2.3.2" do |s| | ||
s.extensions << "Rakefile" | ||
s.write "Rakefile", <<-RUBY | ||
task :default do | ||
abort "make installing activesupport-2.3.2 fail" | ||
end | ||
RUBY | ||
end | ||
end | ||
|
||
install_gemfile <<-G | ||
source "file:#{gem_repo2}" | ||
gem "rails" | ||
G | ||
expect(out).to end_with(<<-M.strip) | ||
An error occurred while installing activesupport (2.3.2), and Bundler cannot continue. | ||
Make sure that `gem install activesupport -v '2.3.2'` succeeds before bundling. | ||
In Gemfile: | ||
rails was resolved to 2.3.2, which depends on | ||
actionmailer was resolved to 2.3.2, which depends on | ||
activesupport | ||
M | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters