我正在用ruby制造一个不和谐的机器人,并且正在使用rspotify
gem。 rspotify
具有rest-client v2.0.2
作为依赖关系,而库discordrb
具有rest-client v2.1.0.rc1
作为依赖关系。当我尝试运行代码时,我得到了Gem Conflict Error
,因为两个版本都不能使用。是否可以使用两种版本的gem或以某种方式手动更新rspotify
以使用rest-client 2.1.0.rc1
?
我可以为我所有的宝石上载宝石依赖列表,但是列表很长。任何帮助,将不胜感激。
我还没有使用捆绑软件,而是通过gem install <gem_name>
手动安装了gems。
控制台错误:
Traceback (most recent call last):
2: from start-bot.rb:15:in `<main>'
1: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rspotify (LoadError)
5: from start-bot.rb:15:in `<main>'
4: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
3: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:123:in `rescue in require'
2: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:217:in `try_activate'
1: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/specification.rb:1418:in `activate'
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/specification.rb:2302:in `raise_if_conflicts': Unable to activate rspotify-2.6.0, because rest-client-2.1.0.rc1 conflicts with rest-client (~> 2.0.2) (Gem::ConflictError)
6: from start-bot.rb:15:in `<main>'
5: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
4: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:123:in `rescue in require'
3: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:216:in `try_activate'
2: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:223:in `rescue in try_activate'
1: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/specification.rb:1418:in `activate'
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/specification.rb:2302:in `raise_if_conflicts': Unable to activate rspotify-2.6.0, because rest-client-2.1.0.rc1 conflicts with rest-client (~> 2.0.2) (Gem::ConflictError)