我尝试做什么我试图运行
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 install
并重试了rails g petergate:install
,但同样的错误仍然存在。
当我查看我的宝石时,我确实有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
我不知道如何调试这个。
彼得门宝石在我的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)
答案 0 :(得分:0)
请务必确认ruby -v
,rails -v
和bundle -v
输出预期版本,因为Rails可能使用不同的gemset。