LoginSignup
kuramon01
@kuramon01

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

Railsチュートリアルでデプロイできない

Railsチュートリアルでデプロイできない?

Railsチュートリアル[第6版]の第1章にて、
チュートリアル通りに進めているのですが、以下のコマンド後にうまくデプロイがされていないためか、「https://自分のクラウドIDE.herokuapp.com/ 」のURLが表示されません。

git push heroku master

以下ターミナル全文

/hello_app (master) $ git push heroku master
Counting objects: 120, done.
Compressing objects: 100% (102/102), done.
Writing objects: 100% (120/120), 54.24 KiB | 1.87 MiB/s, done.
Total 120 (delta 13), 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 minitest 5.16.2
remote:        Fetching concurrent-ruby 1.1.10
remote:        Fetching thread_safe 0.3.6
remote:        Fetching zeitwerk 2.6.0
remote:        Installing minitest 5.16.2
remote:        Installing zeitwerk 2.6.0
remote:        Installing thread_safe 0.3.6
remote:        Installing concurrent-ruby 1.1.10
remote:        Fetching builder 3.2.4
remote:        Installing builder 3.2.4
remote:        Fetching erubi 1.10.0
remote:        Installing erubi 1.10.0
remote:        Using racc 1.6.0
remote:        Fetching crass 1.0.6
remote:        Fetching rack 2.2.4
remote:        Fetching nio4r 2.5.8
remote:        Installing crass 1.0.6
remote:        Installing nio4r 2.5.8 with native extensions
remote:        Installing rack 2.2.4
remote:        Fetching websocket-extensions 0.1.5
remote:        Installing websocket-extensions 0.1.5
remote:        Fetching marcel 1.0.2
remote:        Fetching mini_mime 1.1.2
remote:        Installing marcel 1.0.2
remote:        Installing mini_mime 1.1.2
remote:        Fetching msgpack 1.5.4
remote:        Using bundler 2.3.10
remote:        Fetching ffi 1.15.5
remote:        Installing msgpack 1.5.4 with native extensions
remote:        Fetching method_source 1.0.0
remote:        Installing method_source 1.0.0
remote:        Fetching pg 1.1.4
remote:        Installing ffi 1.15.5 with native extensions
remote:        Installing pg 1.1.4 with native extensions
remote:        Fetching thor 1.2.1
remote:        Installing thor 1.2.1
remote:        Fetching rb-fsevent 0.11.1
remote:        Installing rb-fsevent 0.11.1
remote:        Fetching tilt 2.0.11
remote:        Installing tilt 2.0.11
remote:        Fetching turbolinks-source 5.2.0
remote:        Installing turbolinks-source 5.2.0
remote:        Fetching nokogiri 1.13.8 (x86_64-linux)
remote:        Installing nokogiri 1.13.8 (x86_64-linux)
remote:        Fetching tzinfo 1.2.10
remote:        Installing tzinfo 1.2.10
remote:        Fetching websocket-driver 0.7.5
remote:        Installing websocket-driver 0.7.5 with native extensions
remote:        Fetching i18n 1.12.0
remote:        Installing i18n 1.12.0
remote:        Fetching rack-test 2.0.2
remote:        Installing rack-test 2.0.2
remote:        Fetching rack-proxy 0.7.2
remote:        Installing rack-proxy 0.7.2
remote:        Fetching sprockets 3.7.2
remote:        Installing sprockets 3.7.2
remote:        Fetching mail 2.7.1
remote:        Installing mail 2.7.1
remote:        Fetching puma 4.3.6
remote:        Installing puma 4.3.6 with native extensions
remote:        Fetching turbolinks 5.2.0
remote:        Installing turbolinks 5.2.0
remote:        Fetching loofah 2.18.0
remote:        Installing loofah 2.18.0
remote:        Fetching activesupport 6.0.4
remote:        Installing activesupport 6.0.4
remote:        Fetching bootsnap 1.10.3
remote:        Installing bootsnap 1.10.3 with native extensions
remote:        Fetching rails-html-sanitizer 1.4.3
remote:        Installing rails-html-sanitizer 1.4.3
remote:        Fetching rails-dom-testing 2.0.3
remote:        Installing rails-dom-testing 2.0.3
remote:        Fetching globalid 1.0.0
remote:        Installing globalid 1.0.0
remote:        Fetching activemodel 6.0.4
remote:        Installing activemodel 6.0.4
remote:        Fetching jbuilder 2.9.1
remote:        Installing jbuilder 2.9.1
remote:        Fetching actionview 6.0.4
remote:        Installing actionview 6.0.4
remote:        Fetching activejob 6.0.4
remote:        Installing activejob 6.0.4
remote:        Fetching activerecord 6.0.4
remote:        Installing activerecord 6.0.4
remote:        Fetching actionpack 6.0.4
remote:        Installing actionpack 6.0.4
remote:        Fetching actioncable 6.0.4
remote:        Installing actioncable 6.0.4
remote:        Fetching activestorage 6.0.4
remote:        Installing activestorage 6.0.4
remote:        Fetching actionmailer 6.0.4
remote:        Installing actionmailer 6.0.4
remote:        Fetching railties 6.0.4
remote:        Installing railties 6.0.4
remote:        Fetching sprockets-rails 3.4.2
remote:        Installing sprockets-rails 3.4.2
remote:        Fetching actionmailbox 6.0.4
remote:        Installing actionmailbox 6.0.4
remote:        Fetching actiontext 6.0.4
remote:        Installing actiontext 6.0.4
remote:        Fetching webpacker 4.0.7
remote:        Installing webpacker 4.0.7
remote:        Fetching rails 6.0.4
remote:        Installing rails 6.0.4
remote:        Fetching rb-inotify 0.10.1
remote:        Installing rb-inotify 0.10.1
remote:        Fetching sass-listen 4.0.0
remote:        Installing sass-listen 4.0.0
remote:        Fetching sass 3.7.4
remote:        Installing sass 3.7.4
remote:        Fetching sass-rails 5.1.0
remote:        Installing sass-rails 5.1.0
remote:        Bundle complete! 18 Gemfile dependencies, 58 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 (23.74s)
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:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/webpacker-4.0.7/lib/webpacker/env.rb:30:in `available_environments'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/webpacker-4.0.7/lib/webpacker/env.rb:21:in `current'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/webpacker-4.0.7/lib/webpacker/env.rb:15:in `inquire'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/webpacker-4.0.7/lib/webpacker/env.rb:7:in `inquire'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/webpacker-4.0.7/lib/webpacker/instance.rb:11:in `env'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/webpacker-4.0.7/lib/webpacker/instance.rb:18:in `config'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/webpacker-4.0.7/lib/webpacker.rb:26:in `config'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/webpacker-4.0.7/lib/webpacker/railtie.rb:32:in `block in <class:Engine>'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/railties-6.0.4/lib/rails/initializable.rb:32:in `instance_exec'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/railties-6.0.4/lib/rails/initializable.rb:32:in `run'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/railties-6.0.4/lib/rails/initializable.rb:61:in `block in run_initializers'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/railties-6.0.4/lib/rails/initializable.rb:60:in `run_initializers'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/railties-6.0.4/lib/rails/application.rb:363:in `initialize!'
remote:        /tmp/build_172fd141/config/environment.rb:5:in `<main>'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/activesupport-6.0.4/lib/active_support/dependencies.rb:324:in `block in require'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/activesupport-6.0.4/lib/active_support/dependencies.rb:291:in `load_dependency'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/activesupport-6.0.4/lib/active_support/dependencies.rb:324:in `require'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/railties-6.0.4/lib/rails/application.rb:339:in `require_environment!'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/railties-6.0.4/lib/rails/application.rb:523:in `block in run_tasks_blocks'
remote:        /tmp/build_172fd141/vendor/bundle/ruby/3.1.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
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: 66425a269e86d0d2c96493db876be2de5d39a9fc
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version 66425a269e86d0d2c96493db876be2de5d39a9fc
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 damp-headland-03236.
remote: 
To https://git.heroku.com/自分のクラウドIDE.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/自分のクラウドIDE.git'

以下が原因かとは思うのですが、調べても解決できずに困っています。

remote:  !
remote:  !     Precompiling assets failed.
remote:  !

config/datebase.ymlではないかとコメントをいただいたので追記しています。

config/datebase.yml
# SQLite. Versions 3.8.0 and up are supported.
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
#
default: &default
  adapter: sqlite3
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  timeout: 5000

development:
  <<: *default
  database: db/development.sqlite3

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  <<: *default
  database: db/test.sqlite3

production:
  <<: *default
  database: db/production.sqlite3

どうかご教授して頂けると助かります。

0

8Answer

基本的には @github0013@github さんのおっしゃる通りエラーメッセージで検索すれば解決策が見つかるのですが……その検索結果は2ページ目までほぼ間違いしか出てこないですね。

@kuramon01 さん、 ローカルの Node.js を v16 以上までアップグレードして、

yarn add '@rails/webpacker@^5'

を実行して、変更された package.json と yarn.lock をコミットして Heroku にプッシュすれば直ると思います。それでも失敗した場合は package.json の内容をここに貼ってください。

1Like

Comments

  1. @kuramon01

    Questioner
    何度もご回答くださりありがとうございます。
    @github0013@github さんのおっしゃる通り初めは自分で調べて試すべきだということは重々承知しておりますが、どうしても解決できない時にここで質問させていただいております。

    @uasi さんのおっしゃる通り、 作業を行なったのですがうまくいきませんでした。
    Node.js バージョン
    node -v
    v16.12.0

    以下にpackage.json の内容を貼っておきます。

    {
    "name": "hello_app",
    "private": true,
    "dependencies": {
    "@rails/actioncable": "^6.0.0",
    "@rails/activestorage": "^6.0.0",
    "@rails/ujs": "^6.0.0",
    "turbolinks": "^5.2.0"
    },
    "version": "0.1.0",
    "devDependencies": {
    "webpack-dev-server": "^4.9.3"
    }
    }
    何度もすみません。
  2. yarn add '@rails/webpacker@^5' を実行すると package.json の dependencies 以下に @rails/webpacker が追加されるはずですが、入っていませんね。実行したとき何かエラーは出ましたか?
  3. @kuramon01

    Questioner
    もう一度 yarn add '@rails/webpacker@^5' を実行したら package.json に @rails/webpacker が追加されました。
    大変失礼しました。

    再度pushしてみると、今度はデプロイできたようです。(以下push後の結果です)
    何度も何度もご丁寧にお付き合いいただきありがとうございました!
    教えていただいた作業内容や過程はとても勉強になりました。少し甘え過ぎていたかもしれませんが、なるべく自分でも対処できるように頑張ります。
    本当にありがとうございました!
  4. 解決してよかったです。調べて対処できれば何よりですが、 Rails チュートリアルの問題解決の記事は初学者が書いていることが多く当てにならないのが難しいところですね。泥沼にはまりそうだったら質問していただければいいかと思います。
    そのときは調べた記事のリンクや試した手順も質問に書いていただけると回答しやすいです。
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

多分config/database.ymlにproduction用の設定がないとか?

config/database.ymlを掲載できればより分かるかも

0Like

Comments

  1. @kuramon01

    Questioner
    コメントありがとうございます。
    config/database.ymlを追加しておきました。
    ただ、チュートリアルでは全く触れていなかったのですが、なぜなのでしょうか。

ここでpg gemを追加することはありますが、database.ymlについては無いですね。

自分がherokuを使ったのは随分前ですが、v4.1以降からはDATABASE_URLはheroku側で自動付加されるようで、そうれであればrails guideに書かれてなくても不思議はありません。
多分今回のエラーの原因として考えられるのは、いち環境下に置いて複数のデータベースを設定したような形にdatabase.ymlがなっていたからかなと考えます(多分意図的ではないと思うので、yamlの書き方が間違ってたと思う)。

こういう感じ

0Like

Comments

  1. @kuramon01

    Questioner
    参考文献までありがとうございます。
    解決策としては、database.ymlでプライマリデータベースの3層構成に変更すればよいのでしょうか。

    development:
    primary:
    <<: *default
    database: db/development.sqlite3

    上記でも結果は変わらずだったのですが、他をどう書き換えればいいかわかりませんでした。
    「常に ENV['DATABASE_URL']​ (存在する場合) に接続しておく」とはどういうことなのでしょうか。
    理解が及ばずでお手数をおかけしますが、何卒ご教授お願いいたします。

Rails 6.0 と Ruby 3.1 に互換性がないせいです。 Rails 6.1.5 以上にアップグレードしてください。

参考: https://gist.github.com/yahonda/2776d8d7b6ea7045359f38c10449937b#rails-60z

エラーの原因は Rails 6.0 と Ruby 3.1 において YAML のエイリアス(*default の部分)が解釈できない問題があるせいなので、以下のように <<: *default を消して default: ブロックの中身を書き写せば Rails 6.0 のままでも動かせるとは思います。

development:
  <<: *default
  database: db/development.sqlite3

development:
  adapter: sqlite3
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  timeout: 5000
  database: db/development.sqlite3

Rails 6.1.5 以上なら書き換える必要なく動きます。

0Like

Comments

  1. @kuramon01

    Questioner
    コメントありがとうございます。
    チュートリアル通りにバージョンも固定で進めているため、現在Rubyのバージョンは2.6.3なのですが、Rails 6.1.5 以上にアップグレードした方がよいでしょうか。

    $ ruby -v
    ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

    なお、ブロックの中身はご提案通りに書き換えてみましたが、同じ結果でした。
  2. Heroku では Ruby 3.1.2 が使われていますよ。

    > remote: -----> Compiling Ruby/Rails
    > remote: -----> Using Ruby version: ruby-3.1.2
  3. Heroku では Ruby 2.7.6, 3.0.4, 3.1.2 が使えます。 https://devcenter.heroku.com/articles/ruby-support#ruby-versions

    Heroku で Ruby 2.6.3 は使えません。少なくともローカルの Ruby は Heroku のバージョンに揃えてください。 Rails もできればアップグレードしたほうがいいですが、しない場合は Rails 6.0 と Ruby 2.7 の組み合わせなら動くと思います。

    Gemfile に ruby "2.7.6" のように書けば Heroku の Ruby バージョンを指定できます。
  4. ブロックの中身を書き換える場合は test: や production: などもすべて同様に書き換えて、 default: &default ブロックは消してください。

丁寧にご回答ありがとうございます。

途中経過ですが、
Rails 6.0 と Ruby 2.7 の組み合わせ
ブロックの中身を書き換えた場合では以下の通りでした。

今回のは「error Command "webpack" not found.」でしょうか。。
Railsのアップグレードも試してみようと思います。

$ git push heroku master
Counting objects: 14654, done.
Compressing objects: 100% (7769/7769), done.
Writing objects: 100% (14654/14654), 37.56 MiB | 21.68 MiB/s, done.
Total 14654 (delta 5580), reused 14639 (delta 5572)
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-2.7.6
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:        Fetching rails 6.0.4
remote:        Installing sass-rails 5.1.0
remote:        Installing rails 6.0.4
remote:        Fetching webpacker 4.0.7
remote:        Installing webpacker 4.0.7
remote:        Bundle complete! 18 Gemfile dependencies, 58 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 (25.46s)
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:        yarn install v1.22.17
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [3/4] Linking dependencies...
remote:        warning " > webpack-dev-server@4.9.3" has unmet peer dependency "webpack@^4.37.0 || ^5.0.0".
remote:        warning "webpack-dev-server > webpack-dev-middleware@5.3.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
remote:        [4/4] Building fresh packages...
remote:        Done in 2.49s.
remote:        I, [2022-07-28T09:03:58.797874 #1014]  INFO -- : Writing /tmp/build_74f749c1/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css
remote:        I, [2022-07-28T09:03:58.798391 #1014]  INFO -- : Writing /tmp/build_74f749c1/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css.gz
remote:        Compiling…
remote:        Compilation failed:
remote:        error Command "webpack" not found.
remote:        
remote:        yarn run v1.22.17
remote:        info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
remote:        
remote: 
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !       Push rejected to damp-headland-03236.
remote: 
To https://git.heroku.com/自分のクラウドIDE.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/自分のクラウドIDE.git'
database.yml
development:
  adapter: sqlite3
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  timeout: 5000
  database: db/development.sqlite3

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  timeout: 5000
  database: db/development.sqlite3

production:
  adapter: sqlite3
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  timeout: 5000
  database: db/development.sqli
0Like

Comments

  1. @kuramon01

    Questioner
    おっしゃる通りです。
    なるべく自分で調べて、どうしてもわからない内容だけ質問させていただきます。
    ご回答していただきありがとうございました!
$ git push && git push heroku master
Counting objects: 5, done.
Compressing objects: 100% (5/5), done.

〜中略〜

remote:        Hash: 5b4b854a3598ce3ecaa0
remote:        Version: webpack 4.46.0
remote:        Time: 3561ms
remote:        Built at: 07/29/2022 4:46:39 AM
remote:                                                Asset       Size  Chunks                         Chunk Names
remote:               js/application-47d23cf6ec24919d2856.js   68.2 KiB       0  [emitted] [immutable]  application
remote:            js/application-47d23cf6ec24919d2856.js.br   15.2 KiB          [emitted]              
remote:            js/application-47d23cf6ec24919d2856.js.gz   17.5 KiB          [emitted]              
remote:           js/application-47d23cf6ec24919d2856.js.map    205 KiB       0  [emitted] [dev]        application
remote:        js/application-47d23cf6ec24919d2856.js.map.br   43.5 KiB          [emitted]              
remote:        js/application-47d23cf6ec24919d2856.js.map.gz   50.3 KiB          [emitted]              
remote:                                        manifest.json  364 bytes          [emitted]              
remote:                                     manifest.json.br  130 bytes          [emitted]              
remote:                                     manifest.json.gz  142 bytes          [emitted]              
remote:        Entrypoint application = js/application-47d23cf6ec24919d2856.js js/application-47d23cf6ec24919d2856.js.map
remote:        [0] ./app/javascript/packs/application.js 742 bytes {0} [built]
remote:        [4] ./app/javascript/channels/index.js 205 bytes {0} [built]
remote:        [5] ./app/javascript/channels sync _channel\.js$ 160 bytes {0} [built]
remote:            + 3 hidden modules
remote:        
remote:        Asset precompilation completed (19.83s)
remote:        Cleaning assets
remote:        Running: rake assets:clean
remote: -----> Detecting rails configuration
remote: 
remote: ###### WARNING:
remote: 
remote:        Detecting rails configuration failed
remote:        set HEROKU_DEBUG_RAILS_RUNNER=1 to debug
remote: 
remote: ###### WARNING:
remote: 
remote:        No Procfile detected, using the default web server.
remote:        We recommend explicitly declaring how to boot your server process via a Procfile.
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote: 
remote: 
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> console, rake, web
remote: 
remote: -----> Compressing...
remote:        Done: 118.2M
remote: -----> Launching...
remote:        Released v6
remote:        https://自分のクラウドIDE.herokuapp.com/ deployed to Heroku
remote: 
remote: This app is using the Heroku-20 stack, however a newer stack is available.
remote: To upgrade to Heroku-22, see:
remote: https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack
remote: 
remote: Verifying deploy... done.
To https://git.heroku.com/自分のクラウドIDE.git
 * [new branch]      master -> master
0Like
This answer has been deleted for violation of our Terms of Service.

Your answer might help someone💌