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

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

新規登録して質問してみよう
ただいま回答率
85.50%
Cloud9

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 6

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

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

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

Q&A

解決済

1回答

1420閲覧

herokuデプロイ時にHeroku | Welcome to your new app! と表示されデプロイできない

Ai_.

総合スコア2

Cloud9

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 6

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

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

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

0グッド

0クリップ

投稿2020/07/31 06:12

前提・実現したいこと

herokuへデプロイし、表示させたい

rails tutorialの後にオリジナルアプリを作成しています
tutorialを見ながらgit push heroku masterを実行したところ

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

エラーメッセージ

error: failed to push some refs to 'https://git.heroku.com/mysterious-eyrie-13192.git'

と表示されています。
こちらのエラーをググったのですがまだ知らないGUIなどの知識が出てきてしまい、混乱しているので質問させていただきました。

該当のソースコード

git

1Counting objects: 98, done. 2 3remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 4remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. 5文字数オーバーのため省略 6 7remote: Bundle complete! 19 Gemfile dependencies, 63 gems now installed. 8remote: Gems in the groups development and test were not installed. 9remote: Bundled gems are installed into `./vendor/bundle` 10remote: Post-install message from i18n: 11remote: 12remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. 13remote: But that may break your application. 14remote: 15remote: If you are upgrading your Rails application from an older version of Rails: 16remote: 17remote: Please check your Rails app for 'config.i18n.fallbacks = true'. 18remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 19remote: 'config.i18n.fallbacks = [I18n.default_locale]'. 20remote: If not, fallbacks will be broken in your app by I18n 1.1.x. 21remote: 22remote: If you are starting a NEW Rails application, you can ignore this notice. 23remote: 24remote: For more info see: 25remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 26remote: 27remote: Post-install message from sass: 28remote: 29remote: Ruby Sass has reached end-of-life and should no longer be used. 30remote: 31remote: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new 32remote: primary implementation: https://sass-lang.com/install 33remote: 34remote: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the 35remote: sassc gem: https://github.com/sass/sassc-ruby#readme 36remote: 37remote: * For more details, please refer to the Sass blog: 38remote: https://sass-lang.com/blog/posts/7828841 39 40字数オーバーのため省略 41 42remote: rake aborted! 43remote: NoMethodError: undefined method `halt_callback_chains_on_return_false=' for ActiveSupport:Module 44remote: /tmp/build_14d0eebc/config/initializers/new_framework_defaults.rb:21:in `<top (required)>' 45remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:318:in `load' 46remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:318:in `block in load' 47remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:291:in `load_dependency' 48remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:318:in `load' 49remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/engine.rb:666:in `block in load_config_initializer' 50remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/notifications.rb:182:in `instrument' 51remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/engine.rb:665:in `load_config_initializer' 52remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/engine.rb:625:in `block (2 levels) in <class:Engine>' 53remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/engine.rb:624:in `each' 54remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/engine.rb:624:in `block in <class:Engine>' 55remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/initializable.rb:32:in `instance_exec' 56remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/initializable.rb:32:in `run' 57remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/initializable.rb:61:in `block in run_initializers' 58remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/initializable.rb:50:in `each' 59remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/initializable.rb:50:in `tsort_each_child' 60remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/initializable.rb:60:in `run_initializers' 61remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/application.rb:363:in `initialize!' 62remote: /tmp/build_14d0eebc/config/environment.rb:5:in `<top (required)>' 63remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:324:in `require' 64remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:324:in `block in require' 65remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:291:in `load_dependency' 66remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:324:in `require' 67remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/application.rb:339:in `require_environment!' 68remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/application.rb:523:in `block in run_tasks_blocks' 69remote: /tmp/build_14d0eebc/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define' 70remote: Tasks: TOP => environment 71remote: (See full trace by running task with --trace) 72remote: 73remote: ! 74remote: ! Precompiling assets failed. 75remote: ! 76remote: ! Push rejected, failed to compile Ruby app. 77remote: 78remote: ! Push failed 79remote: Verifying deploy... 80remote: 81remote: ! Push rejected to mysterious-eyrie-13192. 82remote: 83To https://git.heroku.com/mysterious-eyrie-13192.git 84 ! [remote rejected] master -> master (pre-receive hook declined) 85error: failed to push some refs to 'https://git.heroku.com/mysterious-eyrie-13192.git' 86コード

試したこと

別の記事 https://teratail.com/questions/166277 を参考にし、「 git remote -v 」と打ったところ

Heroku https://git.heroku.com/mysterious-eyrie-13192.git (fetch) Heroku https://git.heroku.com/mysterious-eyrie-13192.git (push) origin https://github.com/Yamashita-Taiki/review_app.git (fetch) origin https://github.com/Yamashita-Taiki/review_app.git (push)

と出ています。上二つを見る限り異なるサーバになっているというわけでも内容に感じました。

また Heroku log したところ

ubuntu:~/environment/review_app (master) $ heroku logs 2020-07-30T17:17:17.118484+00:00 app[api]: Release v1 created by user 2020-07-30T17:17:17.118484+00:00 app[api]: Initial release by user 2020-07-30T17:17:17.227363+00:00 app[api]: Release v2 created by user 2020-07-30T17:17:17.227363+00:00 app[api]: Enable Logplex by user 2020-07-30T17:17:42.000000+00:00 app[api]: Build started by user 2020-07-30T17:21:16.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/a5c265da-892a-4501-9732-a7993dea33e0/activity/builds/9fc94ca5-a47a-4cef-8a23-70b51b9173de 2020-07-30T17:22:17.519180+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=mysterious-eyrie-13192.herokuapp.com request_id=3ced97be-1dd4-4606-9964-43a58c0bf6af fwd="111.239.170.117" dyno= connect= service= status=502 bytes= protocol=https 字数オーバーのため省略 2020-07-31T05:09:55.000000+00:00 app[api]: Build started by user 2020-07-31T05:13:27.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/a5c265da-892a-4501-9732-a7993dea33e0/activity/builds/39b64cc6-7732-4fef-8a98-8846c3c4fec4

と出て、いるような状況です。

補足情報(FW/ツールのバージョンなど)

cloud9を使用しております。
字数をオーバーしていたため省略している部分もあって申し訳ありません。
初歩的だとは思いますが力お貸しいただけると幸いです。

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

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

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

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

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

guest

回答1

0

ベストアンサー

Rails の過去バージョンが生成したファイルが
新しい Rails のバージョンでは動作しないことが原因のようです

config/initializers/new_framework_defaults.rb
の問題の行を削除します

既存のアプリのRailsのバージョンをあげた際にrails sが立ち上がらない - Qiita

参考:
Obsoleted method halt_callback_chains_on_return_false still called in Rails 5.2 · Issue #32653 · rails/rails

Rails 5.1 generated a file in your application at
config/initializers/new_framework_defaults.rb
which contains this code.
You'll need to delete the offending line.

投稿2020/07/31 06:56

y_shinoda

総合スコア3272

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

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

Ai_.

2020/07/31 08:29

ご回答ありがとうございます。 解決できなかったため、現状を報告させていただきます。 アドバイスいただいた通り、config/initializers/new_framework_defaults.rb の中のActiveSupport.halt_callback_chains_on_return_false = false を削除しました。 そしてcommand+sで保存し、同じようにheroku create -> git push heroku masterを行なったのですが、与えられたURLにはWelcome to your new app!と表示されてしまっています。また同じように NoMethodError: undefined method `halt_callback_chains_on_return_false=' for ActiveSupport:Module とも表示されてしまっており、変更が反映されていないように感じます。 どのようにすれば反映され、またWelcome to your new app! から脱出できるのでしょうか? ターミナルのメッセージは前回と全くおなじです。
y_shinoda

2020/07/31 08:37

次の点を確認お願いします: - Heroku にプッシュする前にコミットを行ったこと - コミットを行ったブランチが master ブランチであること - プッシュ時のログにエラーが出ていないこと
Ai_.

2020/08/01 05:08

遅くなってしまい申し訳ありません。それぞれの確認方法を調べることに時間をかけすぎてしまいました。 - Heroku にプッシュする前にコミットを行ったこと 「プッシュする前にコミットを行ったこと」が git commit -a -m "〜〜"のことであれば行なっております - コミットを行ったブランチが master ブランチであること masterブランチでした - プッシュ時のログにエラーが出ていないこと 出ていました 「git push heroku master」を行なった結果として(私から見ても明らかにエラーと分かるもの) remote: error Command "webpack" not found. 3つのremote: !に Precompiling assets failed. remote: ! Push rejected, failed to compile Ruby app. remote: ! Push failed error: failed to push some refs to 'https://git.heroku.com/arcane-dusk-20864.git' が出ていました。 remote: error Command "webpack" not found.に関しては海外の記事で「computerのnodeの問題と言われていました」 3つのremote: !に Precompiling assets failed.に関してはhttps://qiita.com/hellojtokyo/items/ef1d4a390f8cbb06f6b7 こちらの記事に似ているものがあったのですがこのかたとは状況が異なっていました。 remote: ! Push rejected, failed to compile Ruby app. については記事があったのですが、どのように解決したのか記されていませんでした。 というような状況です。
y_shinoda

2020/08/01 05:26

エラーメッセージが変わっているので、おそらく最初の問題は解決しています この先は Node.js の話も関係してくるので、 新たに質問を立て直した方が良いでしょう お互いの説明量的にも、回答欄でやりとりを続けることにも無理があります 新たに質問を投稿すると次のようなメリットがあります: - 質問者も回答者も新たにポイントを取得できます - すべての回答者が質問を確認し、回答が得られる確率が上がります - 検索でこの質問にたどり着いた人が質問のタイトルに対するシンプルな回答を得ることができ、質問に高評価が得られやすくなります 質問を立て直すときは、Node.js, webpack などのタグも追加すると 回答が得られやすくなります
Ai_.

2020/08/01 06:01

最初のエラ〜コードと比べてみたところ、remote: error Command "webpack" not found.が増えている(それ以外は同じ??)と感じるのですが、まずremote: error Command "webpack" not found.のエラーを解決することに注力するという考えで問題ないでしょうか? 自分の方で解決できなければまた新たに質問を建てさせていただこうと思います
y_shinoda

2020/08/01 06:12

与えられた情報ではそのように見えますが、 僕が答えるとすれば、 遭遇したことがないエラーなので、念のためエラーメッセージ全体も見たいです
Ai_.

2020/08/01 06:59

かしこまりました。 後ほど、新たな質問を建てさせていただきます
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問