###railsチュートリアル10章でfaker gemを追加する際
gem 'faker', '1.7.3'
とgemfileに追加しbundle installしたところ
Bundler could not find compatible versions for gem "i18n": In snapshot (Gemfile.lock): i18n (= 1.6.0) 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 install がうまく行きませんでした。
調べたところgemfile.lockが関係していると思い、
rm Gemfile.lock
と打ち込んだ後、bundle installできました。
その後
rails db:migrate:reset
と打つと
Traceback (most recent call last): 5: from bin/rails:3:in `<main>' 4: from bin/rails:3:in `load' 3: from /home/ec2-user/environment/sample_app/bin/spring:10:in `<top (required)>' 2: from /home/ec2-user/environment/sample_app/bin/spring:10:in `new' 1: from /home/ec2-user/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/bundler/lockfile_parser.rb:95:in `initialize' /home/ec2-user/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
と表示されます。サーバーを起動しようとしても同じ文が表示されます。
先ほどのgemfile.lockを削除してしまったことが関係していると考えていますが、
どのような対処法がございますでしょうか。
よろしくおねがいします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。