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.
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. When I view my gems, I do have 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
:
# 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。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.