<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Missing host to link to! Please provide :host parameter or set default_url_options[:host]</title>
	<atom:link href="http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/</link>
	<description>linux + ruby on rails = love</description>
	<lastBuildDate>Fri, 09 Sep 2011 03:54:28 +0300</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mark</title>
		<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/comment-page-1/#comment-322</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 09 Sep 2011 03:54:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=323#comment-322</guid>
		<description>Another side-effect of putting the declaration in a before_filter is that it will be executed once for *every* request. Use the appropriate config environment files where it is run only *once* when the application starts. 

Any cases with a valid reason to override the mail settings can still be done on an individual basis.</description>
		<content:encoded><![CDATA[<p>Another side-effect of putting the declaration in a before_filter is that it will be executed once for *every* request. Use the appropriate config environment files where it is run only *once* when the application starts. </p>
<p>Any cases with a valid reason to override the mail settings can still be done on an individual basis.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cory Schires</title>
		<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/comment-page-1/#comment-312</link>
		<dc:creator>Cory Schires</dc:creator>
		<pubDate>Wed, 16 Feb 2011 17:19:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=323#comment-312</guid>
		<description>@Jason

It&#039;s true what you say about the benefits of the before_filter being dynamic. But more importantly, we expect configuration details (like host settings) to be specified in the env files. That&#039;s the convention. For example, that&#039;s where devise tells you to place this info – not in a before filter. 

Although your idea is good and the logic is sound, I think it&#039;s better to follow the conventions. That way future developers know where to find things.</description>
		<content:encoded><![CDATA[<p>@Jason</p>
<p>It&#8217;s true what you say about the benefits of the before_filter being dynamic. But more importantly, we expect configuration details (like host settings) to be specified in the env files. That&#8217;s the convention. For example, that&#8217;s where devise tells you to place this info – not in a before filter. </p>
<p>Although your idea is good and the logic is sound, I think it&#8217;s better to follow the conventions. That way future developers know where to find things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/comment-page-1/#comment-306</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 20 Dec 2010 22:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=323#comment-306</guid>
		<description>@Sandy
But, wouldn&#039;t those be hard-coded values?  The before_filter approach doesn&#039;t require code changes when the application moves or is deployed in on additional host.</description>
		<content:encoded><![CDATA[<p>@Sandy<br />
But, wouldn&#8217;t those be hard-coded values?  The before_filter approach doesn&#8217;t require code changes when the application moves or is deployed in on additional host.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandy</title>
		<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/comment-page-1/#comment-303</link>
		<dc:creator>Sandy</dc:creator>
		<pubDate>Fri, 19 Nov 2010 05:41:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=323#comment-303</guid>
		<description>@Phillip
That is why there are environment specific config files...

development.rb
production.rb
test.rb</description>
		<content:encoded><![CDATA[<p>@Phillip<br />
That is why there are environment specific config files&#8230;</p>
<p>development.rb<br />
production.rb<br />
test.rb</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keikun17</title>
		<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/comment-page-1/#comment-299</link>
		<dc:creator>Keikun17</dc:creator>
		<pubDate>Tue, 31 Aug 2010 04:01:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=323#comment-299</guid>
		<description>Francesco, it&#039;s cleaner if you just let the environtment configs handle the default_url_options</description>
		<content:encoded><![CDATA[<p>Francesco, it&#8217;s cleaner if you just let the environtment configs handle the default_url_options</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francesco</title>
		<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/comment-page-1/#comment-280</link>
		<dc:creator>Francesco</dc:creator>
		<pubDate>Sat, 24 Apr 2010 05:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=323#comment-280</guid>
		<description>Hello, 

thanks for the infos, you solved my issue, now I&#039;m using  this in my application.rb and it works well for my needs.

config.action_mailer.default_url_options = { :host =&gt; Rails.env == &quot;production&quot; ? &#039;domain.com&#039; : &#039;localhost:3000&#039; }</description>
		<content:encoded><![CDATA[<p>Hello, </p>
<p>thanks for the infos, you solved my issue, now I&#8217;m using  this in my application.rb and it works well for my needs.</p>
<p>config.action_mailer.default_url_options = { :host =&gt; Rails.env == &#8220;production&#8221; ? &#8216;domain.com&#8217; : &#8216;localhost:3000&#8242; }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phillip</title>
		<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/comment-page-1/#comment-279</link>
		<dc:creator>Phillip</dc:creator>
		<pubDate>Fri, 23 Apr 2010 14:19:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=323#comment-279</guid>
		<description>@Sandy,

While that would work, the before_filter approach has the added benefit of being dynamic to the environment Rails is currently running in. This gives you the flexibility to have links in development point to development, not production.</description>
		<content:encoded><![CDATA[<p>@Sandy,</p>
<p>While that would work, the before_filter approach has the added benefit of being dynamic to the environment Rails is currently running in. This gives you the flexibility to have links in development point to development, not production.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandy</title>
		<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/comment-page-1/#comment-274</link>
		<dc:creator>Sandy</dc:creator>
		<pubDate>Mon, 01 Feb 2010 23:36:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=323#comment-274</guid>
		<description>Or put it in environment.rb

config.action_mailer.default_url_options = { :host =&gt; &quot;example.com&quot; }</description>
		<content:encoded><![CDATA[<p>Or put it in environment.rb</p>
<p>config.action_mailer.default_url_options = { :host =&gt; &#8220;example.com&#8221; }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lau</title>
		<link>http://www.cherpec.com/2009/06/missing-host-to-link-to-please-provide-host-parameter-or-set-default_url_optionshost/comment-page-1/#comment-258</link>
		<dc:creator>Lau</dc:creator>
		<pubDate>Sun, 29 Nov 2009 05:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=323#comment-258</guid>
		<description>Thanks !! :-)
solved my problem.</description>
		<content:encoded><![CDATA[<p>Thanks !! <img src='http://www.cherpec.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
solved my problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

