“缺少主机链接到!”为了设计 [英] "Missing host to link to!" for Devise

查看:98
本文介绍了“缺少主机链接到!”为了设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Devise,每当我尝试创建一个帐户时,似乎都阻止了。

I installed Devise and things seem to stop up whenever I try to create an account.

完整的错误读取:

缺少主机链接到!请提供:host参数或set default_url_options [:host]

我已经在development.rb块里面找到了以下代码。我已经尝试过,没有添加smtp配置。

I've got the following code sitting in inside the development.rb block. I've tried it with and without the added smtp configurations.

config.action_mailer.default_url_options = { :host => 'localhost' }  
config.action_mailer.delivery_method = :smtp
...

有没有定义主机不正确?

推荐答案

配置文件/不会自动重新加载开发。如果您对此文件进行了更改,请确保已重新启动Rails服务器,以及任何Rails控制台会话,以使更改生效。

The files under config/ are not automatically reloaded in development. If you have made changes to this file, ensure that you have restarted the Rails server, and any Rails console sessions for the changes to take effect.

这篇关于“缺少主机链接到!”为了设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆