0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

mac で コマンド$ rails server を実行した時にエラーが出た話2

Last updated at Posted at 2019-11-08

目的

  • サーバをスタートするコマンド$ 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
```

解決方法

  1. コマンド$ 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.
    
  2. 本当は最初に実行したかったコマンド$ 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`
    
  3. なぜかコマンド$ 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
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?