source 'https://rubygems.org'
ruby '2.3.1'
gem 'rails', '5.0.0'
gem 'pg'
gem 'devise', '~> 4.2'
gem 'bcrypt', '3.1.11'
gem 'faker', '1.6.3'
gem 'will_paginate', '3.1.0'
gem 'bootstrap-will_paginate', '0.0.10'
gem 'bootstrap-sass', '3.3.6'
gem 'puma'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.1.1'
gem 'turbolinks', '5.0.0.beta2'
gem 'jbuilder', '2.4.1'
gem 'gon', '~> 6.0', '>= 6.0.1'
gem 'filepicker-rails', '~> 2.1'
gem 'sass-rails'
gem 'jquery-rails'
gem 'haml'
gem 'figaro'
gem 'bootstrap_form'
gem 'paypal-sdk-adaptivepayments'
gem 'stripe'
gem 'omniauth-stripe-connect'
gem 'appsignal'
group :development, :test do
gem 'byebug', '9.0.0', platform: :mri
end
group :development do
gem 'web-console', '3.1.1'
gem 'listen', '3.0.8'
gem 'spring', '1.7.2'
gem 'spring-watcher-listen', '2.0.0'
end
group :test do
gem 'rails-controller-testing', '0.1.1'
gem 'minitest-reporters', '1.1.9'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
production.rbRailsの工夫回復 -
# Devise config
config.action_mailer.default_url_options = { :host => 'd*****.com' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default :charset => "utf-8"
config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
domain: ENV["GMAIL_DOMAIN"],
authentication: "plain",
enable_starttls_auto: true,
user_name: ENV["GMAIL_USERNAME"],
password: ENV["GMAIL_PASSWORD"]
}
devise.rb
config.mailer_sender = 'dwo*******@gmail.com'
application.yml
production:
STRIPE_SECRET_KEY: "sk_live_6yjOP****************"
STRIPE_PUBLISHABLE_KEY: "pk_live_85nZsm****************"
STRIPE_CONNECT_CLIENT_ID: "ca_95VFITa4PgcUn****************"
CONNECTED_STRIPE_ACCOUNT_ID: "acct_18kh****************"
GMAIL_DOMAIN: "gmail.com"
GMAIL_USERNAME: "d********@gmail.com"
GMAIL_PASSWORD: "****************"
Herokuのログあなたのパスワード、電子メールforgotが受信されません
2016-12-03T23:57:40.189178+00:00 app[web.1]: I, [2016-12-03T23:57:40.189101 #4] INFO -- : [1b1fec5e-5916-4f73-8d8e-829d08fbad0b] Rendering devise/mailer/reset_password_instructions.html.erb
2016-12-03T23:57:40.190121+00:00 app[web.1]: I, [2016-12-03T23:57:40.190063 #4] INFO -- : [1b1fec5e-5916-4f73-8d8e-829d08fbad0b] Rendered devise/mailer/reset_password_instructions.html.erb (0.8ms)
2016-12-03T23:57:40.314034+00:00 app[web.1]: D, [2016-12-03T23:57:40.313920 #4] DEBUG -- : [1b1fec5e-5916-4f73-8d8e-829d08fbad0b] Devise::Mailer#reset_password_instructions: processed outbound mail in 130.1ms
2016-12-03T23:57:40.486943+00:00 app[web.1]: I, [2016-12-03T23:57:40.486840 #4] INFO -- : [1b1fec5e-5916-4f73-8d8e-829d08fbad0b] Sent mail to d**************@gmail.com (172.7ms)
2016-12-03T23:57:40.487001+00:00 app[web.1]: D, [2016-12-03T23:57:40.486935 #4] DEBUG -- : [1b1fec5e-5916-4f73-8d8e-829d08fbad0b] Date: Sat, 03 Dec 2016 23:57:40 +0000
2016-12-03T23:57:40.487003+00:00 app[web.1]: From: d**************@gmail.com
2016-12-03T23:57:40.487003+00:00 app[web.1]: Reply-To: d**************@gmail.com
2016-12-03T23:57:40.487004+00:00 app[web.1]: To: dwo**********@gmail.com
2016-12-03T23:57:40.487005+00:00 app[web.1]: Message-ID: <[email protected]451fc.mail>
2016-12-03T23:57:40.487006+00:00 app[web.1]: Subject: Reset password instructions
2016-12-03T23:57:40.487007+00:00 app[web.1]: Mime-Version: 1.0
2016-12-03T23:57:40.487008+00:00 app[web.1]: Content-Type: text/html;
2016-12-03T23:57:40.487008+00:00 app[web.1]: charset=UTF-8
2016-12-03T23:57:40.487010+00:00 app[web.1]: <p>Hello d**************@gmail.com!</p>
2016-12-03T23:57:40.487009+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2016-12-03T23:57:40.487009+00:00 app[web.1]:
2016-12-03T23:57:40.487012+00:00 app[web.1]: <p>Someone has requested a link to change your password. You can do this through the link below.</p>
2016-12-03T23:57:40.487012+00:00 app[web.1]:
2016-12-03T23:57:40.487011+00:00 app[web.1]:
2016-12-03T23:57:40.487013+00:00 app[web.1]: <p><a href="https://d**************.com/users/password/edit?reset_password_token=8Ash**************">Change my password</a></p>
2016-12-03T23:57:40.487014+00:00 app[web.1]: <p>If you didn't request this, please ignore this email.</p>
2016-12-03T23:57:40.487013+00:00 app[web.1]:
2016-12-03T23:57:40.487015+00:00 app[web.1]: <p>Your password won't change until you access the link above and create a new one.</p>
2016-12-03T23:57:40.487016+00:00 app[web.1]:
2016-12-03T23:57:40.490471+00:00 app[web.1]: I, [2016-12-03T23:57:40.490413 #4] INFO -- : [1b1fec5e-5916-4f73-8d8e-829d08fbad0b] Redirected to https://www.**************.com/users/sign_in
2016-12-03T23:57:40.490700+00:00 app[web.1]: I, [2016-12-03T23:57:40.490635 #4] INFO -- : [1b1fec5e-5916-4f73-8d8e-829d08fbad0b] Completed 302 Found in 537ms (ActiveRecord: 7.8ms)
herokuにenv変数を登録し、ダッシュボードで正しいことをダブルチェックしました。
なぜ私は電子メールを受信していないのか分かりません。 Herokuのログは、私がなぜそれがうまくいかないのかを指摘していません。誰でも私のコードに間違いがありますか?ありがとうございました!!!
あなたの問題に対する直接的な解決策ではありませんが、確認メールをgmailに添付する必要はありません。あなたがherokuを使用しているので、単純にSENDGRIDを設定すれば、それは魅力的なように機能するはずです。 – angkiki
@angkiki方向をありがとう。私は自分のアプリケーションでSendGridを実装しようとしています。 –