0

잘 작동하는 Rails Tutorial 응용 프로그램 내에 메일러를 설정했습니다. c9.io 내에서 기본 경로를 방문 할 때 이메일의Rails ActionMailer 미리보기가 작동하지 않습니다.

프리뷰가 너무 일하고 : 이전 https://app-name.c9users.io/rails/mailers/user_mailer

이 나에게하는 아웃 바운드 이메일과 형식, HTML 또는 TXT를 선택할 수있는 옵션을 준, 내가 싶었어요 의 미리보기를 봅니다.

unknown action

을 그리고 로그에, 내가 이해할 수없는 IP 주소에 대한 언급과 404이 : 같이

지금, 나는 페이지에서, 응답을 얻을

Started GET "/rails/mailers/user_mailer" for 88.210.160.9 at 2017-11-15 16:43:20 +0000 
Cannot render console from 88.210.160.9! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 
Processing by Rails::MailersController#preview as HTML 
    Parameters: {"path"=>"user_mailer"} 
Completed 404 Not Found in 252ms (ActiveRecord: 0.0ms) 

이전에 문제가 없었지만 로그가 서버에 로컬 인 경우에만 미리보기에 액세스 할 수 없음을 의미합니다. 나는 특정 메일 발송 방법에 액세스하려고하면, 나는 페이지에 같은 오류가 발생합니다 : 나는 HTML & 텍스트와 관련된 전망이

Started GET "/rails/mailers/user_mailer/account_activation" for 88.210.160.9 at 2017-11-15 16:57:41 +0000 
Cannot render console from 88.210.160.9! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 
Processing by Rails::MailersController#preview as HTML 
    Parameters: {"path"=>"user_mailer/account_activation"} 
Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms) 

: 추적 비슷한

mailer 2

과 - 이메일의 버전 및 작업 메일러 예상대로이 모든 작품,하지만 미리보기가 표시되지 않습니다 :

class UserMailer < ApplicationMailer 

    def account_activation(user) 
    @user = user 
    mail to: @user.email, subject: "Account activation" 
    end 

    def password_reset(user) 
    @user = user 
    mail to: @user.email, subject: "Password reset" 
    end 

end 

모든 그대 ghts는 인정 될 것이다.

답변

0

메일러 파일의 이름과 .erb 또는 .slim 확장자 사이에 .html이 있는지 확인하십시오. 나는 같은 문제가 있었다.

+0

내 메일러보기 파일의 확장자는'.html.erb'이거나 비 -HTML보기 파일은'.text.erb'입니다. – OnlySteveH

관련 문제