chibayuta-cp
@chibayuta-cp (Chiba Yuta)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

herokuへのデプロイがうまくいきません!

解決したいこと

herokuのデプロイを成功させたいです。

ーーーーーーーーーーーーーーーーーーーーーーーーー

Ruby on Railsでポートフォリオを作成しており、
herokuを使って公開しようとしているのですが、
以下のようなエラーがずっと出ていてなかなか公開できません。

発生している問題・エラー

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 274 bytes | 91.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/ruby
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.2.11
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.7.2
remote: -----> Installing dependencies using bundler 2.2.11
remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote:        Using rake 13.0.3
remote:        Using concurrent-ruby 1.1.8
remote:        Using i18n 1.8.9
remote:        Using minitest 5.14.4
remote:        Using tzinfo 2.0.4
remote:        Using zeitwerk 2.4.2
remote:        Using activesupport 6.1.3.1
remote:        Using builder 3.2.4
remote:        Using erubi 1.10.0
remote:        Using racc 1.5.2
remote:        Using nokogiri 1.11.2 (x86_64-linux)
remote:        Using rails-dom-testing 2.0.3
remote:        Using crass 1.0.6
remote:        Using loofah 2.9.0
remote:        Using rails-html-sanitizer 1.3.0
remote:        Using actionview 6.1.3.1
remote:        Using rack 2.2.3
remote:        Using rack-test 1.1.0
remote:        Using actionpack 6.1.3.1
remote:        Using nio4r 2.5.7
remote:        Using websocket-extensions 0.1.5
remote:        Using websocket-driver 0.7.3
remote:        Using actioncable 6.1.3.1
remote:        Using globalid 0.4.2
remote:        Using activejob 6.1.3.1
remote:        Using activemodel 6.1.3.1
remote:        Using activerecord 6.1.3.1
remote:        Using marcel 1.0.0
remote:        Using mini_mime 1.0.3
remote:        Using activestorage 6.1.3.1
remote:        Using mail 2.7.1
remote:        Using actionmailbox 6.1.3.1
remote:        Using actionmailer 6.1.3.1
remote:        Using actiontext 6.1.3.1
remote:        Using msgpack 1.4.2
remote:        Using bootsnap 1.7.3
remote:        Using bundler 2.2.11
remote:        Using ffi 1.15.0
remote:        Using jbuilder 2.11.2
remote:        Using method_source 1.0.0
remote:        Using pg 1.2.3
remote:        Using puma 5.2.2
remote:        Using rack-proxy 0.6.5
remote:        Using thor 1.1.0
remote:        Using railties 6.1.3.1
remote:        Using sprockets 4.0.2
remote:        Using sprockets-rails 3.2.2
remote:        Using rails 6.1.3.1
remote:        Using sassc 2.4.0
remote:        Using tilt 2.0.10
remote:        Using sassc-rails 2.1.2
remote:        Using sass-rails 6.0.0
remote:        Using semantic_range 3.0.0
remote:        Using turbolinks-source 5.2.0
remote:        Using turbolinks 5.2.1
remote:        Using webpacker 5.2.1
remote:        Bundle complete! 17 Gemfile dependencies, 56 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into `./vendor/bundle`
remote:        Bundle completed (0.88s)
remote:        Cleaning up the bundler cache.
remote: -----> Installing node-v12.16.2-linux-x64
remote: -----> Installing yarn-v1.22.4
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        yarn install v1.22.4
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        info fsevents@2.3.2: The platform "linux" is incompatible with this module.
remote:        info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        info fsevents@1.2.13: The platform "linux" is incompatible with this module
remote:        info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        [3/4] Linking dependencies...
remote:        warning " > webpack-cli@4.6.0" has unmet peer dependency "webpack@4.x.x || 5.x.x".
remote:        warning "webpack-cli > @webpack-cli/configtest@1.0.2" has unmet peer dependency "webpack@4.x.x || 5.x.x".
remote:        warning " > webpack-dev-server@3.11.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
remote:        warning "webpack-dev-server > webpack-dev-middleware@3.7.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
remote:        [4/4] Building fresh packages...
remote:        Done in 26.65s.
remote:        Compiling...
remote:        Compiled all packs in /tmp/build_6c151aa9/public/packs
remote:        One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
remote:         - webpack-cli (https://github.com/webpack/webpack-cli)
remote:           The original webpack full-featured CLI.
remote:        We will use "yarn" to install the CLI via "yarn add -D".
remote:        Do you want to install 'webpack-cli' (yes/no):
remote:
remote:        Asset precompilation completed (29.88s)
remote:        Cleaning assets
remote:        Running: rake assets:clean
remote: -----> Detecting rails configuration
remote:
remote: ###### WARNING:
remote:
remote:        There is a more recent Ruby version available for you to use:
remote:
remote:        2.7.3
remote:
remote:        The latest version will include security and bug fixes. We always recommend
remote:        running the latest version of your minor release.
remote:
remote:        Please upgrade your Ruby version.
remote:
remote:        For all available Ruby versions see:
remote:          https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote:
remote:
remote: -----> Discovering process types
remote:        Procfile declares types     -> release
remote:        Default types for buildpack -> console, rake, web
remote:
remote: -----> Compressing...
remote:        Done: 95.8M
remote: -----> Launching...
remote:  !     Release command declared: this new release will not be available until the command succeeds.
remote:        Released v7
remote:        https://chibaportfolio0411.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
remote: Running release command...
remote:
remote: Waiting for release.... done.
To https://git.heroku.com/chibaportfolio0411.git
   0ca2a5f..7eb7522  master -> master

自分で試したこと

rubyのバーションは、2.7.3のアップデート完了しております。

webpackのところを更新したりしている途中です。

解決方法をぜひ教えていただきたいです。
よろしくお願いします!

0

1Answer

Ruby のバージョンが最新ではない警告が出ているものの、デプロイは成功しています。

ページを開くと

We're sorry, but something went wrong.

とエラー画面が出る状態だと思いますが、それはデプロイエラーではなく Rails アプリケーションの実行時エラーによるものです。一度ブラウザでエラー画面を表示させた後 heroku logs を実行してログを出力し、エラーメッセージを探してください。

0Like

Comments

  1. @chibayuta-cp

    Questioner

    @uasiさん、ありがとうございます!

    ```
    We're sorry, but something went wrong.
    If you are the application owner check the logs for more information.
    ```

    とエラー画面が出ました。

    エラー探してみます!

Your answer might help someone💌