[英]Bundler cannot find i18n-0.8.6 when attempting to install petergate gem
What I tried to do I tried to run 我尝试去做的事
rails g petergate:install
I expected it to add a migration and insert petergate into my User model. 我希望它添加一个迁移并将petergate插入我的用户模型。
What actually happened is I got an error in terminal saying: 实际发生的是终端出现错误:
Could not find i18n-0.8.6 in any of the sources
Run `bundle install` to install missing gems.
I ran bundle install
and retried rails g petergate:install
, but the same error keeps occurring. 我运行了
bundle install
rails g petergate:install
试了rails g petergate:install
,但是仍然发生相同的错误。 When I view my gems, I do have i18n-0.8.6
. 当我查看自己的宝石时,确实有
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
I am not sure how to debug this. 我不确定如何调试它。 The petergate gem is in my
Gemfile
: 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'
The following commands have been run for debugging purposes: 已运行以下命令以进行调试:
$ 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)
确保确认ruby -v
, rails -v
和bundle -v
输出了预期的版本,因为Rails可能使用了不同的gemset。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.