Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/21.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 on rails 尝试安装petergate gem时,Bundler找不到i18n-0.8.6_Ruby On Rails_Ruby_Macos_Rubygems - Fatal编程技术网

Ruby on rails 尝试安装petergate gem时,Bundler找不到i18n-0.8.6

Ruby on rails 尝试安装petergate gem时,Bundler找不到i18n-0.8.6,ruby-on-rails,ruby,macos,rubygems,Ruby On Rails,Ruby,Macos,Rubygems,我想做的事我想跑 rails g petergate:install 我希望它能添加一个迁移并将petergate插入到我的用户模型中 实际发生的是,我在终端上有个错误,说: Could not find i18n-0.8.6 in any of the sources Run `bundle install` to install missing gems. 我运行了bundle安装并重试了rails g petergate:install,但同样的错误不断发生。 当我查看我的gems时,

我想做的事我想跑

rails g petergate:install
我希望它能添加一个迁移并将petergate插入到我的用户模型中

实际发生的是,我在终端上有个错误,说:

Could not find i18n-0.8.6 in any of the sources
Run `bundle install` to install missing gems.
我运行了
bundle安装
并重试了
rails g petergate:install
,但同样的错误不断发生。 当我查看我的gems时,我确实有
i18n-0.8.6

$ rails g petergate:install
Could not find i18n-0.8.6 in any of the sources
Run `bundle install` to install missing gems.
$ bundle install
Using rake 12.0.0
Using concurrent-ruby 1.0.5
Using i18n 0.8.6
我不知道如何调试这个。 petergate宝石在我的
Gemfile
中:

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'friendly_id', '~> 5.2', '>= 5.2.1'
gem 'devise', '~> 4.3'
gem 'bootstrap', '~> 4.0.0.beta'
gem 'microurb_view_tool', '~> 0.1.0'
gem 'petergate', '~> 1.7', '>= 1.7.5'
已运行以下命令以进行调试:

$ cat Gemfile.lock | grep i18n
      i18n (~> 0.7)
    i18n (0.8.6)

$ bundle exec rails g petergate:install
Could not find i18n-0.8.6 in any of the sources
Run `bundle install` to install missing gems.

$ bundle exec rake rails:update:bin
rake aborted!
Don't know how to build task 'rails:update:bin' (see --tasks)
/Users/danale/.rvm/gems/ruby-2.4.0@global/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/Users/danale/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
/Users/danale/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
$cat Gemfile.lock | grep i18n
i18n(~>0.7)
i18n(0.8.6)
$bundle exec rails g petergate:安装
在任何源中都找不到i18n-0.8.6
运行“bundle install”安装丢失的gems。
$bundle exec rake rail:update:bin
雷克流产了!
不知道如何构建任务“rails:update:bin”(请参阅--tasks)
/Users/danale/.rvm/gems/ruby-2.4。0@global/gems/rake-12.0.0/exe/rake:27:in`'
/Users/danale/.rvm/gems/ruby-2.4.0/bin/ruby\u可执行文件挂钩:15:in'eval'
/Users/danale/.rvm/gems/ruby-2.4.0/bin/ruby\u可执行文件\u挂钩:15:in`'
(通过使用--trace运行任务查看完整跟踪)

请务必确认
ruby-v
rails-v
bundle-v
输出了预期的版本,因为rails可能使用不同的gemset。

您能验证
i18n
的版本吗:
cat Gemfile.lock | grep i18n
请参见上面的内容,事实上,我有两个版本是在稍后尝试排除故障时添加的。您可能已经升级了rails版本,而没有升级bin/folder。试试这个:
bundle-exec-rake-rails:update:bin
如果ỳ你运行bundle exec rails g petergate:install?@Oxfist,该死的,你打对了!我一读ruby-v,就想起昨晚我做了一个RVM2.4来创建一个新的ruby gem。我切换回2.3.3和rails g petergate:install works!请发帖回答。