railsチュートリアル「1.5.2 Herokuにデプロイする」にてcloud9よりruby on railsのアプリをHerokuへデプロイ(git push heroku master)する際にエラーが発生しデプロイできません。解決方法をご教示いただけると幸いです。
発生している問題・エラーメッセージ
git push heroku master Counting objects: 126, done. Compressing objects: 100% (108/108), done. Writing objects: 100% (126/126), 155.56 KiB | 3.62 MiB/s, done. Total 126 (delta 20), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Determining which buildpack to use for this app remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. remote: Detected buildpacks: Ruby,Node.js remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order remote: -----> Ruby app detected remote: -----> Installing bundler 2.3.10 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-3.1.2 remote: -----> Installing dependencies using bundler 2.3.10 remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 remote: Fetching gem metadata from https://rubygems.org/.......... remote: Fetching rake 12.3.3 remote: Installing rake 12.3.3 remote: Fetching concurrent-ruby 1.1.10 〜中略〜 remote: Bundle complete! 18 Gemfile dependencies, 59 gems now installed. remote: Gems in the groups 'development' and 'test' were not installed. remote: Bundled gems are installed into `./vendor/bundle` remote: Post-install message from sass: remote: remote: Ruby Sass has reached end-of-life and should no longer be used. remote: remote: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new remote: primary implementation: https://sass-lang.com/install remote: remote: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the remote: sassc gem: https://github.com/sass/sassc-ruby#readme remote: remote: * For more details, please refer to the Sass blog: remote: https://sass-lang.com/blog/posts/7828841 remote: remote: Bundle completed (28.25s) remote: Cleaning up the bundler cache. remote: -----> Installing node-v16.13.1-linux-x64 remote: -----> Installing yarn-v1.22.17 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: Rails couldn't infer whether you are using multiple databases from your database.yml and can't generate the tasks for the non-primary databases. If you'd like to use this feature, please simplify your ERB. remote: rake aborted! remote: Psych::BadAlias: Unknown alias: default 〜中略〜 remote: Tasks: TOP => environment remote: (See full trace by running task with --trace) remote: remote: ! remote: ! Precompiling assets failed. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: 9f774684b10e4ae53ba64fdb3f667a90081da21c remote: ! remote: ! We have detected that you have triggered a build from source code with version 9f774684b10e4ae53ba64fdb3f667a90081da21c remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run: remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: ! https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to thawing-beyond-55905. remote: To https://git.heroku.com/thawing-beyond-55905.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/thawing-beyond-55905.git'
試したこと
-
webpackerにまつわるエラーが出ていた為
bundle exec rails webpacker:install
を実行 -
エラー原因を探る為
heroku logs
を実行するも解決に至らず
heroku logs Build failed -- check your build output: https://dashboard.heroku.com/apps/646b0e0b-383e-413e-8040-ab35861f719c/activity/builds/c08b5759-7fbd-40bc-a977-7b13f50dc5ee
上記ページへ移動、以下エラーを確認
-----> Building on the Heroku-20 stack -----> Determining which buildpack to use for this app ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. Detected buildpacks: Ruby,Node.js See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order -----> Ruby app detected -----> Installing bundler 2.3.10 -----> Removing BUNDLED WITH version in the Gemfile.lock -----> Compiling Ruby/Rails -----> Using Ruby version: ruby-3.1.2 -----> Installing dependencies using bundler 2.3.10 Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 Fetching gem metadata from https://rubygems.org/.......... Fetching rake 12.3.3 Installing rake 12.3.3 〜中略〜 Bundle complete! 18 Gemfile dependencies, 59 gems now installed. Gems in the groups 'development' and 'test' were not installed. Bundled gems are installed into `./vendor/bundle` Post-install message from sass: Ruby Sass has reached end-of-life and should no longer be used. * If you use Sass as a command-line tool, we recommend using Dart Sass, the new primary implementation: https://sass-lang.com/install * If you use Sass as a plug-in for a Ruby web framework, we recommend using the sassc gem: https://github.com/sass/sassc-ruby#readme * For more details, please refer to the Sass blog: https://sass-lang.com/blog/posts/7828841 Bundle completed (28.25s) Cleaning up the bundler cache. -----> Installing node-v16.13.1-linux-x64 -----> Installing yarn-v1.22.17 -----> Detecting rake tasks -----> Preparing app for Rails asset pipeline Running: rake assets:precompile Rails couldn't infer whether you are using multiple databases from your database.yml and can't generate the tasks for the non-primary databases. If you'd like to use this feature, please simplify your ERB. rake aborted! Psych::BadAlias: Unknown alias: default /tmp/build_fd22df06/vendor/bundle/ruby/3.1.0 Tasks: TOP => environment (See full trace by running task with --trace) ! ! Precompiling assets failed. ! ! Push rejected, failed to compile Ruby app. ! Push failed
- configファイルの修正
config/environment/development.rbにてconfig.file_watcher = ActiveSupport::EventedFileUpdateChecker
のコメントアウトで解決したとの記事があった為実施するも変わらず。
【参考】Gemfileのtest・development環境がinstallされない
https://teratail.com/questions/263378
補足情報(FW/ツールのバージョンなど)
ruby 2.7.6
Rails 6.0.4
node v14.19.0
宜しくお願い致します。

回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。