Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 2.5 activesupport ubuntu与i18n冲突_Ruby_Rails I18n_Activesupport - Fatal编程技术网

Ruby 2.5 activesupport ubuntu与i18n冲突

Ruby 2.5 activesupport ubuntu与i18n冲突,ruby,rails-i18n,activesupport,Ruby,Rails I18n,Activesupport,我想用madeonruby运行一个简单的脚本,当我尝试运行它时,我会遇到下一个错误 Traceback (most recent call last): 6: from thread.py:6:in `<main>' 5: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require' 4: from /root/.rbenv

我想用madeonruby运行一个简单的脚本,当我尝试运行它时,我会遇到下一个错误

Traceback (most recent call last):
    6: from thread.py:6:in `<main>'
    5: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    4: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
    3: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems.rb:217:in `try_activate'
    2: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems.rb:224:in `rescue in try_activate'
    1: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/specification.rb:1437:in `activate'
/root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/specification.rb:2324:in `raise_if_conflicts': Unable to activate activesupport-5.1.5, because i18n-1.0.0 conflicts with i18n (~> 0.7) (Gem::ConflictError)

我遗漏了什么吗?

问题似乎是刚刚发布了i18n的1.0.0版本,但是
activesupport
与此版本不兼容(
~>0.7

一种解决方案是在系统范围内删除1.0.0,然后重新安装0.9.5,这是1.0.0之前的最新版本:

gem uninstall i18n --all --force
gem install i18n --version 0.9.5

信息太少。你在用Bundler吗?档案是什么?如果不使用Bundler,您的
require
语句是什么?Hi@Casper我刚刚运行了“gem install--”和我需要的gem,我的语句是:
require'firebase'require'conekta'require'json'require'savon'require'crack'需要'active_support/core_ext/hash'#from_xml需要'nokogiri'需要'xmlsimple'需要'mysql2'类Cron
我明白了!你说得对,看来问题解决了。谢谢。
gem uninstall i18n --all --force
gem install i18n --version 0.9.5