本番環境にSendGridを導入してHerokuにデプロイを行おうとしたところ以下のerrorが出てしまいます。
remote: -----> Installing node-v6.10.0-linux-x64 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: rake aborted! remote: NameError: undefined local variable or method `false ' for #<AppName::Application:0x007f6328078d10> remote: /tmp/build_9d31984dd8d87889ad3f791cd1a6961e/config/environments/production.rb:60:in `block in <top (required)>' remote: /tmp/build_9d31984dd8d87889ad3f791cd1a6961e/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:209:in `instance_ev 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:
error元をみたところ、
production.rb
config.action_mailer.raise_delivery_errors = false
ここでひかかってしまいます。
他の設定は以下のようにしました。
config.action_mailer.default_url_options = {host: 'http://Appname.herokuapp.com' } config.action_mailer.raise_delivery_errors = false config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :user_name => ENV['SENDGRID_USERNAME'], :password => ENV['SENDGRID_PASSWORD'], :domain => "heroku.com", :address => "smtp.sendgrid.net", :port => 587, :authentication => :plain, :enable_starttls_auto => true }
confg/application.rb
class Application < Rails::Application config.assets.initialize_on_precompile = false
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/04/10 15:20