目的
- サーバをスタートするコマンド$ rails serverを実行した時のエラー解決法を知る。
- 今回の解決方が本当に妥当なものなのか不明なためあくまで筆者の体験談としてまとめる。
エラー内容
```terminal
$ rails s
=> Booting Puma
=> Rails 6.0.0 application starting in development
=> Run `rails server --help` for more startup options
error Couldn't find an integrity file
error Found 1 errors.
========================================
Your Yarn packages are out of date!
Please run `yarn install --check-files` to update.
========================================
To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).
yarn check v1.19.1
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this
command.
Exiting
```
解決方法
-
コマンド
$ yarn install
を実行した。$ yarn install yarn install v1.19.1 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning " > webpack-dev-server@3.9.0" has unmet peer dependency "webpack@^4.0.0". warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0". [4/4] 🔨 Building fresh packages... ✨ Done in 16.84s.
-
本当は最初に実行したかったコマンド
$ brew install yarn
を実行した。(おそらくこのコマンドを実行する必要はない)$ brew install yarn Updating Homebrew... ==> Auto-updated Homebrew! Updated 3 taps (heroku/brew, homebrew/core and homebrew/cask). ==> New Formulae adios2 comby jd mpi4py nbdime openjdk openjdk@12 calceph gmt@5 manticoresearch mpv oauth2l openjdk@11 tdkjs ==> Updated Formulae ・ ・ ・ Warning: yarn 1.19.1 is already installed and up-to-date To reinstall 1.19.1, run `brew reinstall yarn`
-
なぜかコマンド
$ rails server
でエラーが出ずにサーバが立った。$ rails s => Booting Puma => Rails 6.0.0 application starting in development => Run `rails server --help` for more startup options Puma starting in single mode... * Version 3.12.1 (ruby 2.5.0-p0), codename: Llamas in Pajamas * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://localhost:3000 Use Ctrl-C to stop
付録
- コマンド$ rails serverを実行した時のエラーと解決までのログを記載する。
MacBook-miriwo:eveyDayStudy admin$ rails s
=> Booting Puma
=> Rails 6.0.0 application starting in development
=> Run `rails server --help` for more startup options
error Couldn't find an integrity file
error Found 1 errors.
========================================
Your Yarn packages are out of date!
Please run `yarn install --check-files` to update.
========================================
To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).
yarn check v1.19.1
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
Exiting
MacBook-miriwo:eveyDayStudy admin$ yarn
yarn install v1.19.1
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > webpack-dev-server@3.9.0" has unmet peer dependency "webpack@^4.0.0".
warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
[4/4] 🔨 Building fresh packages...
✨ Done in 16.84s.
MacBook-miriwo:eveyDayStudy admin$ brew install yarn
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (heroku/brew, homebrew/core and homebrew/cask).
==> New Formulae
adios2 comby jd mpi4py nbdime openjdk openjdk@12
calceph gmt@5 manticoresearch mpv oauth2l openjdk@11 tdkjs
==> Updated Formulae
git ✔ django-completion i2p nodenv serverless
heroku/brew/heroku ✔ dmtx-utils imagemagick nomad shadowsocks-libev
heroku/brew/heroku-node ✔ dnscrypt-proxy imageoptim-cli nss shairport-sync
libtiff ✔ doitlive imapfilter nuget shared-mime-info
python ✔ drafter inlets nvm sip
ruby-build ✔ duplicity ipbt offlineimap siril
sqlite ✔ dust itk opa skopeo
ack dvc jenkins openapi-generator slowhttptest
adwaita-icon-theme elixir jfrog-cli-go openimageio snakemake
angular-cli eprover jmeter openrct2 solr
ansible exploitdb jruby openvpn sonobuoy
apache-arrow ffmpeg jsvc operator-sdk sourcedocs
apache-arrow-glib ffmpeg@2.8 just osquery spatialindex
asdf ffsend kubeseal packer spigot
ask-cli fig2dev kyma-cli paket sqldiff
atlantis flake8 lazygit parallel sqlite-analyzer
atlassian-cli flow libcouchbase php-cs-fixer sqlmap
axel fluid-synth libedit phpunit starship
babel flyway libetpan picard-tools stgit
balena-cli folly libheif pmd svgo
ballerina frpc libmaxminddb ponyc teleport
black frps libopenmpt pqiv terraform
blockhash fwup libpeas prestosql terragrunt
bro fx libsass procs tile38
bup gdcm libssh proteinortho tunnel
cash-cli ghq libtommath pspg typescript
cfn-lint git-delta llvm pulumi ucloud
cfssl gitlab-runner llvm@6 py2cairo vagrant-completion
chafa glooctl llvm@7 py3cairo vapoursynth-imwri
cheat gmic llvm@8 pyenv vim
cimg gmt lmod qhull vim@7.4
cli53 gnunet logtalk qjackctl vips
clojure go macvim qt wolfssl
cmake go-bindata mariadb quex x265
cmatrix go@1.12 mariadb@10.2 qxmpp xcodegen
composer godep mercurial rabbitmq xtensor
conan goofys mgba rclone yacas
contentful-cli goreleaser micronaut rdesktop yafc
coq gradle minikube re2 yle-dl
csvq grafana mkl-dnn repo youtube-dl
curl gtk-gnutella mkvtoolnix residualvm yq
curl-openssl haproxy mpg123 rocksdb zabbix
cython harfbuzz mypy rom-tools zbar
dasm haxe mysql-connector-c++ rpm zola
dbhash helmfile mysql@5.6 rrdtool zsh-history-substring-search
dcmtk hlint neko s3-backer zydis
deark hugo neomutt s3ql
deno hydra netlify-cli s6
di hyperscan ngt scummvm
dive hypre nifi scummvm-tools
==> Renamed Formulae
jupyter -> jupyterlab
==> Deleted Formulae
aiccu bdsup2sub dcal gmt@4 gmtl mariadb@10.0 mysql@5.5
Warning: yarn 1.19.1 is already installed and up-to-date
To reinstall 1.19.1, run `brew reinstall yarn`
MacBook-miriwo:eveyDayStudy admin$ rails s
=> Booting Puma
=> Rails 6.0.0 application starting in development
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 3.12.1 (ruby 2.5.0-p0), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop