更新: 我已经在其他一些小修复中重新启动了我的服务器,但我没有收到错误消息。但是,我没有收到确认电子邮件。此外,我可以通过单击电子邮件验证登录。
在尝试使用 Devise 的电子邮件确认/验证时,当我通过 Devise 登录到我的 Web 应用程序时,我从我的服务器收到以下信息:
RuntimeError in Devise/registrations#create
Missing host to link to! Please provide :host parameter or set default_url_options[:host]
Extracted source (around line #5):
2:
3: <p>You can confirm your account through the link below:</p>
4:
5: <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
这很奇怪,因为我已经包含config.action_mailer.default_url_options = { :host => 'localhost:3000' }在我的 development.rb 文件中并且我处于开发模式。
提前致谢!