git reset --hardをして失敗
初心者の知識ではわからないぐらい何かおかしいことが起きた。
怖い。
マイグレーションファイルは消えてしまうし、ステータスも知ることができない。
*********@mbp garden % rails db:migarate status
/Users/************/*******/******/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
from /Users/************/*******/******/config/boot.rb:4:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
`require': cannot load such file -- bootsnap/setup (LoadError)で検索
@nicolasmlv you are using bootsnap (0.2.12) which did not include this file. We are now on bootsnap 1.1.2 (After jumping from 0.3.x which introduced bootsnap/setup).
Please run bundle update bootsnap :)
何いっているかわからないが、bundle update bootsnap
を行った。
*********@mbp garden % bundle update bootsnap
Could not find gem 'bootsnap'.
どうやらgem 'bootsnap'が必要らしい
gem "bootsnap", require: false
もう一回bundle update bootsnap
を行った。
*********::@mbp garden % bundle update bootsnap
Fetching gem metadata from https://rubygems.org/..........
.
.
.
An error occurred while installing msgpack (1.6.1), and Bundler cannot continue.
.
.
.
An error occurred while installing msgpack (1.6.1), and Bundler cannot continue.
In Gemfile:
bootsnap was resolved to 1.16.0, which depends on
msgpack
ダメだった。
行が多すぎて見落としているところもあるかもしれない。
困った。
最後にrails db:migrateを行った。
**********@mbp garden % rails db:migrate
Could not find gem 'bootsnap (~> 1.16.0)' in locally installed gems.
The source contains the following gems matching 'bootsnap':
* bootsnap-1.4.5
* bootsnap-1.11.1
Run `bundle install` to install missing gems
.
.
.
An error occurred while installing msgpack (1.6.1), and Bundler cannot continue.
In Gemfile:
bootsnap was resolved to 1.16.0, which depends on
msgpack
解決しそうな文言発見
* bootsnap-1.4.5
* bootsnap-1.11.1
Run `bundle install` to install missing gems
どれかわからないがとりあえずbootsnap-1.11.1
を使って検索
gem 'bootsnap', '~> 1.11', '>= 1.11.1'
出典
解決
migrateとstatusはできるようになった。
しかし
これからまたエラーが出るだろう。
パニックになった。