Puma 在开发模式下无法使用 actionmailer 预览版

Puma not working with actionmailer preview in development mode

我是运行宁rails 4.2.5.1puma 2.16.0。我的development.rb文件中的相关配置是

  config.action_mailer.default_url_options = {
    host: 'localhost',
    port: 3000, protocol: 'http' }
  config.action_mailer.smtp_settings = { address: 'localhost', port: 1025 }
  config.action_mailer.preview_path = "#{Rails.root}/mailers_previews/"

当我转到 /rails/mailers 时 Chrome 显示页面 'This webpage is not available'。如果我 运行 webrick 而不是

rails server webrick

然后显示我的邮件预览页面。

几个月来,我一直在 heroku 上使用 puma 进行开发和生产,其他一切正常。如何让 puma 显示预览?

the puma project 的帮助下,原来我使用的是旧的 url

http://0.0.0:3000/rails/mailers

我应该在什么时候使用

http://localhost:3000/rails/mailers

后来url与puma合作