0
在我config/environment/development.rb,
我有使用配置URL,而不是config.ip的
config.ip: 'http://localhost:3000'
在我config/environment/production.rb,
我有
config.ip = 'http://52.74.70.227'
我想使用类似config.url = 'http://example.com'
因此,当有人收到
激活电子邮件链接从我的链接显示http://example.com/abc
intead的http://52.74.70.227/abc
请尝试这种希望它将工作。 Rails.application.routes.default_url_options [:host] ='http:// localhost:3000' –
@P_M这会将我的IP更改为生产中的url – Supertracer
为什么不能定义这个config.action_mailer.default_url_options = {:host =>“localhost:3000”}并在生产中config.action_mailer.default_url_options = {:host =>“example.com”} – LHH