LoginSignup
2
0

More than 3 years have passed since last update.

Railsチュートリアルでfakerがインストールできない場合の対処法

Posted at

Railsチュートリアルの10章でgemに「 faker (= 1.7.3) 」を追加し、bundle install
しようとすると

Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "i18n":
  In snapshot (Gemfile.lock):
    i18n (= 1.8.2)

  In Gemfile:
    rails (= 5.1.6) was resolved to 5.1.6, which depends on
      activesupport (= 5.1.6) was resolved to 5.1.6, which depends on
        i18n (>= 0.7, < 2)

    faker (= 1.7.3) was resolved to 1.7.3, which depends on
      i18n (~> 0.5)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

というエラーがでる。

解決のためにbundle updateしたり、バージョンの指定を広くしたりしたが、インストールできなかった。

なので仕方なく

Gemfile
gem 'faker', '1.7.3'

から

Gemfile
gem 'faker'

にしてバージョンを指定しないことで、無事インストールができた。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0