前提・実現したいこと
現在Railsチュートリアルで、本番環境でのメール送信を実現するために、「SendGrid」の導入を検討しています。そこで、「config/environments/production.rb」でSendGridの設定をし、「$ git push heroku master」のコマンドを叩きました。すると以下のようなエラーが発生し、色々試しましたが解決しませんでした。解決策をご存知の方は、ご教授いただけると幸いです。
発生している問題・エラーメッセージ
$ git push heroku master #省略 remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: rake aborted! remote: NameError: undefined local variable or method `config_action_mailer' for #<************---> #省略 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: Verifying deploy... remote: remote: ! Push rejected to *************. remote: To https://*************.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://*************.git'
試したこと
1.「Precompiling assets failed.」のエラー内容から、「application.rb」に「config.assets.initialize_on_precompile = false」を追加しました。→エラー内容変わらず。
2.おそらく「config/environments/production.rb」にある、未定義のローカル変数「config_action_mailer」を定義すれば解決するのかと思いますが、その方法が発見できませんでした。
どなたかご存知の方がおられましたら、ぜひご教授をよろしくお願いします。
補足情報
PC: Mac
Rails 5.1.6
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/28 04:34
2019/06/28 04:35
2019/06/28 05:30