デーモン起動するとWebpackのコンパイルに失敗する
Railsの勉強でRails+VueのアプリをEC2上に作成しているのですが、
rails sしたときはWebpackのコンパイルが上手くいくのですがrails s -dで実行したときはコンパイルに失敗します。
vueファイルやwebpackの設定はrails webpacker:install:vueを実行した直後の状態で何も変えていません。
エラーメッセージ
rails s -d -b 0.0.0.0でhello_vueを表示するページにアクセスしたときのログです。
Started GET "/home" for xxx.xxx.xx.xx at 2019-02-25 04:40:12 +0000 Cannot render console from xxx.xxx.xx.xx! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 Processing by HomeController#index as HTML Rendering home/index.html.erb within layouts/application [Webpacker] Compiling… [Webpacker] Compilation failed: /home/ec2-user/.rbenv/versions/2.6.0/bin/ruby: No such file or directory -- ./bin/webpack (LoadError)
rails sで実行したときはコンパイルに成功します
Processing by HomeController#index as HTML Rendering home/index.html.erb within layouts/application [Webpacker] Compiling… [Webpacker] Compiled all packs in /home/ec2-user/webpack_test/public/packs Rendered home/index.html.erb within layouts/application (3124.5ms) Completed 200 OK in 3917ms (Views: 3909.6ms | ActiveRecord: 0.0ms)
試したこと
yarn installやbundle installなどは試しました。
補足情報(FW/ツールのバージョンなど)
Amazon Linux AMI release 2018.03
Rails 5.2.2
Ruby 2.6.0
webpacker 3.5
vue 2.6.7
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/02/27 12:25
2019/02/27 14:21