Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to activate concurrent-ruby-ext-1.1.3, because concurrent-ruby-1.1.4 conflicts with concurrent-ruby (= 1.1.3) (Gem::ConflictError)

ruby version 2.5.3

When I typed rails new upload_app, the following error occurred

The error is below

Traceback (most recent call last):
    39: from /Users/zhangjiachen/.rvm/gems/ruby-2.5.3/bin/rails:23:in `<main>'
    38: from /Users/zhangjiachen/.rvm/gems/ruby-2.5.3/bin/rails:23:in `load'
    37: from /Users/zhangjiachen/.rvm/gems/ruby-2.5.3@global/gems/railties-5.2.2/exe/rails:10:in `<top (required)>'
    36: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    35: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    34: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/cli.rb:12:in `<top (required)>'
    33: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    32: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    31: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/command.rb:3:in `<top (required)>'
    30: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    29: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    28: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support.rb:27:in `<top (required)>'
    27: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    26: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    25: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies/autoload.rb:3:in `<top (required)>'
    24: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    23: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    22: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/inflector/methods.rb:3:in `<top (required)>'
    21: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    20: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    19: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/inflections.rb:3:in `<top (required)>'
    18: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    17: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    16: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/inflector/inflections.rb:3:in `<top (required)>'
    15: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    14: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    13: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/concurrent-ruby-1.1.4/lib/concurrent/map.rb:3:in `<top (required)>'
    12: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    11: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    10: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/concurrent-ruby-1.1.4/lib/concurrent/synchronization.rb:5:in `<top (required)>'
     9: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/concurrent-ruby-1.1.4/lib/concurrent/utility/native_extension_loader.rb:30:in `load_native_extensions'
     8: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/concurrent-ruby-1.1.4/lib/concurrent/utility/native_extension_loader.rb:30:in `each'
     7: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/concurrent-ruby-1.1.4/lib/concurrent/utility/native_extension_loader.rb:30:in `block in load_native_extensions'
     6: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/concurrent-ruby-1.1.4/lib/concurrent/utility/native_extension_loader.rb:62:in `try_load_c_extension'
     5: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:34:in `require'
     4: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:123:in `rescue in require'
     3: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems.rb:217:in `try_activate'
     2: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems.rb:224:in `rescue in try_activate'
     1: from /Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/specification.rb:1441:in `activate'
/Users/zhangjiachen/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/specification.rb:2332:in `raise_if_conflicts': Unable to activate concurrent-ruby-ext-1.1.3, because concurrent-ruby-1.1.4 conflicts with concurrent-ruby (= 1.1.3) (Gem::ConflictError)

I tried something

  1. gem list | grep concurrent =>
    concurrent-ruby (1.1.4, 1.1.3, 1.0.2) concurrent-ruby-ext (1.1.3)

  2. gem uninstall concurrent-ruby-1.1.3 => Gem 'concurrent-ruby-1.1.3' is not installed

  3. gem install concurrent-ruby-ext ERROR: Could not find a valid gem 'concurrent-ruby-ext' (>= 0), here is why: Unable to download data from https://rubygems.org/ - no such name (https://rubygems.org/specs.4.8.gz)

like image 380
江洋大盗 Avatar asked Dec 23 '22 00:12

江洋大盗


2 Answers

I solved the problem by gem install concurrent-ruby-ext -v 1.1.5

gem 'concurrent-ruby-ext' has always same version as gem 'concurrent-ruby'

You can refer to https://www.rubydoc.info/gems/concurrent-ruby-ext/1.1.5

gem list | grep concurrent
concurrent-ruby (1.1.5, 1.1.4, 1.1.3, 1.0.2)
concurrent-ruby-ext (1.1.5, 1.1.3)
like image 78
江洋大盗 Avatar answered Mar 09 '23 00:03

江洋大盗


@江洋大盗 is right, if the build system or gemfile.lock lock the build toolchain version, you may need to down-grade the concurrent-ruby and concurrent-ruby-ext version. Command as below.

$ gem uninstall concurrent-ruby -v 1.1.4

or 

$ gem uninstall concurrent-ruby-ext -v 1.1.5

Hope it will help.

like image 41
陈健 Mark Avatar answered Mar 09 '23 01:03

陈健 Mark