質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

GitHub

GitHubは、Gitバージョン管理システムを利用したソフトウェア開発向けの共有ウェブサービスです。GitHub商用プランおよびオープンソースプロジェクト向けの無料アカウントを提供しています。

Q&A

0回答

385閲覧

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

one.82kk

総合スコア5

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

GitHub

GitHubは、Gitバージョン管理システムを利用したソフトウェア開発向けの共有ウェブサービスです。GitHub商用プランおよびオープンソースプロジェクト向けの無料アカウントを提供しています。

0グッド

0クリップ

投稿2022/07/27 13:44

前提

Railsチュートリアル[第6版]の第1章にて、デプロイできずに困っています。

$ heroku create はしています。

発生している問題・エラーメッセージ

チュートリアル通りに進めていたのですが、「git push heroku master」のコマンド後に以下のエラー?が出て、「https://自分のクラウドIDE.herokuapp.com/ 」のURLが表示されません。

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

上記について検索しても直接の解決方法が見つからず、他に問題があるかもとコード一通り見たのですが理解が足りず、解決できませんでした。

原因は他にあるのでしょうか。

ターミナル全文

$ 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: 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'

恐れ入りますが、ご教授いただけますと幸いです。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問