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

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

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

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

Heroku

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

Ruby on Rails

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

Q&A

解決済

1回答

828閲覧

herokuでデプロイした際のエラー

acharazushi487

総合スコア1

Ruby

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

Heroku

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

Ruby on Rails

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

0グッド

0クリップ

投稿2020/09/26 18:13

前提・実現したいこと

railsを使って作ったアプリケーションをherokuでデプロイ
ここに質問の内容を詳しく書いてください。
railsでwebアプリケーションを作っていてherokuでデプロイしたところ以下のようなエラーが発生したので解決したい。

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

railsでwebアプリケーションを作っていてherokuでデプロイしたところ以下のようなエラーが発生した。

エラーメッセージ
.
.
.
remote: Bundle complete! 22 Gemfile dependencies, 81 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 (181.42s)
remote: Cleaning up the bundler cache.
remote: -----> Installing node-v12.16.2-linux-x64
remote: -----> Installing yarn-v1.22.4
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: yarn install v1.22.4
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: error An unexpected error occurred: "https://registry.yarnpkg.com/cosmiconfig/-/cosmi-5.2.1.tgz: Request failed "404 Not Found"".
remote: info If you think this is a bug, please open a bug report with the information provided in "/tmp/build_b27cb7de/yarn-error.log".
remote: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
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 guchikomi1.
remote:
To https://git.heroku.com/guchikomi1.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/guchikomi1.git'

該当のソースコード

Ruby ### 試したこと config.i18n.fallbacks = true を config.i18n.fallbacks = [I18n.default_locale] のように変更して再度デプロイしても同じエラーでpushできません。 ### 補足情報(FW/ツールのバージョンなど) ここにより詳細な情報を記載してください。

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

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

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

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

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

tky_7201

2020/09/27 00:38

ローカルで以下のようにコマンドを打って、herokuにpushするとどうなりますか? yarn upgrade
acharazushi487

2020/09/27 02:56

エラー解決しました! ありがとうございます! どこからそう判断したか教えていただけると喜びます。
tky_7201

2020/09/27 03:01

回答しました。
guest

回答1

0

ベストアンサー

ログをみるとyarn installで失敗しています。それゆえにyarnで何かしらの不具合が起こっていると思いました。なので、node_moduleを削除して、yarn installし直すかyarn upgradeをしてパッケージを更新するかのどちらかが必要だと思います。

投稿2020/09/27 03:01

編集2020/09/27 03:03
tky_7201

総合スコア37

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問