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

Duplication of gem 'rspec' #14

Open
r7kamura opened this issue Feb 22, 2022 · 1 comment
Open

Duplication of gem 'rspec' #14

r7kamura opened this issue Feb 22, 2022 · 1 comment

Comments

@r7kamura
Copy link

r7kamura commented Feb 22, 2022

The Gemfile generated by bundle gem may already contain the gem 'rspec'. (This depends on BUNDLE_GEM__TEST)

In that case, the following error will occur:

[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
You specified: rspec (~> 3.0) and rspec (>= 0). Bundler cannot continue.

 #  from /path/to/Gemfile:13
 #  -------------------------------------------
 #  gem "rubocop", "~> 1.21"
 >  gem 'rspec'
 #  -------------------------------------------

patch 'Gemfile', /\z/, <<~RUBY
gem 'rspec'
RUBY

I think the expected behavior is not to add it if gem 'rspec', ... is already included.

@r7kamura
Copy link
Author

I just noticed that #10 exists.

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

No branches or pull requests

1 participant