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

conflict error after install: Unable to activate twee2-0.5.0, because bundler-2.1.4 conflicts with bundler (~> 1.6) #63

Open
phivk opened this issue Oct 17, 2021 · 1 comment

Comments

@phivk
Copy link

phivk commented Oct 17, 2021

After I install twee2 via

gem install twee2

I get the following ConflictError:

$ twee2
Traceback (most recent call last):
        7: from /Users/phivk/.rvm/gems/ruby-2.6.0/bin/ruby_executable_hooks:22:in `<main>'
        6: from /Users/phivk/.rvm/gems/ruby-2.6.0/bin/ruby_executable_hooks:22:in `eval'
        5: from /Users/phivk/.rvm/gems/ruby-2.6.0/bin/twee2:23:in `<main>'
        4: from /Users/phivk/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems.rb:304:in `activate_bin_path'
        3: from /Users/phivk/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems.rb:304:in `synchronize'
        2: from /Users/phivk/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems.rb:305:in `block in activate_bin_path'
        1: from /Users/phivk/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/specification.rb:1415:in `activate'
/Users/phivk/.rvm/rubies/ruby-2.6.0/lib/ruby/site_ruby/2.6.0/rubygems/specification.rb:2298:in `raise_if_conflicts': Unable to activate twee2-0.5.0, because bundler-2.1.4 conflicts with bundler (~> 1.6) (Gem::ConflictError)

As you can see from the logs above, I have ruby 2.6.0 installed via RVM.

I am not super familiar with the Ruby Gem ecosystem. Is there a way to downgrade bundler-2.1.4 to match ~> 1.6 or upgrade the other way around?

@tmilker
Copy link

tmilker commented Oct 18, 2021

Just edit twee2.gemspec and change the line:

spec.add_runtime_dependency 'bundler', '~> 1.6'

to

spec.add_runtime_dependency 'bundler', '~> 2.1'

The reason why it's a runtime dependency isn't jumping out at me because the require 'bundler/setup' in lib/twee2.rb doesn't seem to be used.

edit: Whoops, was in dev mode and forgot you were just trying to install the gem, not build it. The instructions would require building the gem yourself and installing that. You could also make a new folder and a Gemfile and put:

gem 'twee2', path: '/path/to/your/copy/of/twee2/repo/with/change/above'

and run bundle install

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

2 participants