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

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

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

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

Ruby on Rails

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

Q&A

解決済

1回答

1157閲覧

コマンドgit push heroku masterでpush出来ない。

jun3030

総合スコア16

Ruby

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

Ruby on Rails

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

2グッド

2クリップ

投稿2020/03/12 05:01

前提・実現したいこと

railsで作成したアプリをherokuにあげたい。

数日間悩んで解決できないので質問させて下さい。汗
作成したアプリをherokuにデプロイしようと、ターミナルにてgit push heroku masterしたところ以下のようなエラーが出ます。
エラーが複数出ていますが何一つ解決できない状況です。。

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

ec2-user:~/environment/port (master) $ git push heroku master Counting objects: 24088, done. Compressing objects: 100% (22198/22198), done. Writing objects: 100% (24088/24088), 263.77 MiB | 9.49 MiB/s, done. Total 24088 (delta 8104), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: 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 1.17.3 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.6.3 remote: -----> Installing dependencies using bundler 1.17.3 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: Your Gemfile lists the gem jquery-rails (>= 0) more than once. remote: You should probably keep only one of them. remote: Remove any duplicate entries and specify the gem only once (per group). remote: While it's not a problem now, it could cause errors if you change the version of one of them later. remote: 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`. remote: Fetching gem metadata from https://rubygems.org/......... 省略,, remote: Bundle complete! 30 Gemfile dependencies, 77 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 i18n: remote: remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. remote: But that may break your application. remote: remote: If you are upgrading your Rails application from an older version of Rails: remote: remote: Please check your Rails app for 'config.i18n.fallbacks = true'. remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be remote: 'config.i18n.fallbacks = [I18n.default_locale]'. remote: If not, fallbacks will be broken in your app by I18n 1.1.x. remote: remote: If you are starting a NEW Rails application, you can ignore this notice. remote: remote: For more info see: remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 remote: remote: Bundle completed (211.51s) remote: Cleaning up the bundler cache. remote: Your Gemfile lists the gem jquery-rails (>= 0) more than once. remote: You should probably keep only one of them. remote: Remove any duplicate entries and specify the gem only once (per group). remote: While it's not a problem now, it could cause errors if you change the version of one of them later. remote: 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`. remote: -----> Installing node-v10.15.3-linux-x64 remote: Detected manifest file, assuming assets were compiled locally remote: -----> Detecting rails configuration remote: -----> Detecting rake tasks remote: remote: ###### WARNING: remote: remote: Removing `vendor/bundle`. remote: Checking in `vendor/bundle` is not supported. Please remove this directory remote: and add it to your .gitignore. To vendor your gems with Bundler, use remote: `bundle pack` instead. remote: remote: remote: ###### WARNING: remote: remote: Detecting rails configuration failed remote: set HEROKU_DEBUG_RAILS_RUNNER=1 to debug remote: remote: remote: ###### WARNING: remote: remote: There is a more recent Ruby version available for you to use: remote: remote: 2.6.5 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: ###### 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: remote: -----> Discovering process types remote: Procfile declares types -> (none) remote: Default types for buildpack -> console, rake, web remote: remote: -----> Compressing... remote: ! Compiled slug size: 739.7M is too large (max is 500M). remote: ! See: http://devcenter.heroku.com/articles/slug-size remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to sheltered-brook-37465. remote: To https://git.heroku.com/sheltered-brook-37465.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/sheltered-brook-37465.git'

該当のソースコード

###### WARNING:の部分は気になりますが、調べたところ警告なので一旦は無視していいと記載があった為先に、 Post-install message from i18n: remote: remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. remote: But that may break your application. remote: remote: If you are upgrading your Rails application from an older version of Rails: remote: remote: Please check your Rails app for 'config.i18n.fallbacks = true'. remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be remote: 'config.i18n.fallbacks = [I18n.default_locale]'. remote: If not, fallbacks will be broken in your app by I18n 1.1.x. remote: remote: If you are starting a NEW Rails application, you can ignore this notice. この部分の解決を先に取り組んでいます。

試したこと

エラー内容からgem 'rails-i18n'というgemが原因のようなので調べたところrails 5.2.2以下は
production.rbの内容を config.i18n.fallbacks = trueからconfig.i18n.fallbacks = [I18n.default_locale]に変える必要があると知りました。しかし改善されず。

お忙しい中申し訳ありませんが、何か他に原因などありますでしょうか?汗

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

ruby 2.6.3
Rails 5.1.7

DrqYuto, s.k👍を押しています

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

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

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

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

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

guest

回答1

0

ベストアンサー

remote: -----> Compressing...
remote: ! Compiled slug size: 739.7M is too large (max is 500M).
remote: ! See: http://devcenter.heroku.com/articles/slug-size

ダメそうなのはココですね。
何故かは不明ですが、slugサイズが肥大化しています。

関連して

remote: Removing vendor/bundle.

も気になります。
vendor/bundleディレクトリがgitで管理されています。
.gitignoregit rm --cachedについて調べるとよいでしょう。

他にも何か巨大な画像などをgitで不必要に管理していないかを調べ除外した後に
再挑戦してもダメならば
https://qiita.com/hidehiro98/items/f17df224aa4841341e67
大掃除が必要かなと思います。

投稿2020/03/12 05:25

編集2020/03/12 05:25
asm

総合スコア15147

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

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

jun3030

2020/03/12 11:47

回答ありがとうございます! 言われた通りslugサイズが肥大化しているとの事でしたので、原因を調べたところ画像、動画がアプリ内でアップロードされすぎてherokuの容量制限500MBを超えていたみたいです。 削除したところデプロイ出来ました! 本当にありがとうございます。多分ヒントがなかったら解決できませんでした。汗
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.47%

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

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

質問する

関連した質問