<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>I am not robot. &#187; web hosting</title>
	<atom:link href="http://iamnotrobot.com/category/web-hosting/feed/" rel="self" type="application/rss+xml" />
	<link>http://iamnotrobot.com</link>
	<description>tech stuff and then some</description>
	<lastBuildDate>Fri, 10 Sep 2010 03:42:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using restful_authentication on heroku cloud hosting</title>
		<link>http://iamnotrobot.com/2009/12/using-restful_authentication-on-heroku-cloud-hosting/</link>
		<comments>http://iamnotrobot.com/2009/12/using-restful_authentication-on-heroku-cloud-hosting/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 05:17:52 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[web hosting]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://iamnotrobot.com/?p=488</guid>
		<description><![CDATA[A few days ago I began setting up a rails app that was in need of some user authentication. A friend of mine recommended looking at @technoweenie&#8216;s restful_authentication plugin and I already had messed around with heroku&#8217;s hosting service. Now it was time to combine the two. I initially installed the restful_auth plugin using the &#8216;git [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fiamnotrobot.com%2F2009%2F12%2Fusing-restful_authentication-on-heroku-cloud-hosting%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fiamnotrobot.com%2F2009%2F12%2Fusing-restful_authentication-on-heroku-cloud-hosting%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>A few days ago I began setting up a rails app that was in need of some user authentication. A friend of mine recommended looking at <a id="aptureLink_iQsaT3HHTF" href="http://twitter.com/technoweenie">@technoweenie</a>&#8216;s <a href="http://github.com/technoweenie/restful-authentication">restful_authentication plugin</a> and I already had messed around with <a href="http://heroku.com" target="_blank">heroku&#8217;s</a> hosting service. Now it was time to combine the two.</p>
<p>I initially installed the restful_auth plugin using the &#8216;git clone&#8217; method and my app worked perfectly fine on my local machine. However, when I uploaded the app to heroku, I was hitting a few errors. The first error was that my app was failing to launch because it could not find a const named &#8216;User::Authenticated&#8217; &#8230; how&#8217;s that possible? I installed the plugin , shouldn&#8217;t it just know where to look for it? Well it appears that if you use the &#8216;git clone&#8217; method to install the plugin, it will not work on heroku. You must install the plugin by running &#8216;script/plugin install git://github.com/technoweenie/restful-authentication.git&#8217;. This will put all the pieces in the correct place. ALSO, be sure to change the name of the folder downloaded to &#8216;restful_authentication&#8217; .. that is &#8230; change the hypen to an underscore. Once I changed that, I re-launched my app on heroku using the command &#8216;heroku restart&#8217;, and I hit a (NameError). Seems the &#8216;script/plugin install&#8217; command didn&#8217;t create an file called user_observer.rb that should be placed in the models directory. I&#8217;m not sure if this is a bug at this point but this is the workaround I used:</p>
<p>drop a file named user_observer.rb in your /app/models/ directory and put this code in it:</p>
<p><span style="font-family: Helvetica, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 12px;">class UserObserver &lt; ActiveRecord::Observer</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">def after_create(user)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">UserMailer.deliver_signup_notification(user) if user.not_using_openid?</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">end</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">def after_save(user)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">UserMailer.deliver_activation(user) if user.recently_activated? &amp;&amp; user.not_using_openid?</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">end</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">end</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">Once I had this file in place, my app launched successfully and now included full user authentication.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">YAY!</p>
]]></content:encoded>
			<wfw:commentRss>http://iamnotrobot.com/2009/12/using-restful_authentication-on-heroku-cloud-hosting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Argh Netfirms!!!!</title>
		<link>http://iamnotrobot.com/2008/10/hello-world/</link>
		<comments>http://iamnotrobot.com/2008/10/hello-world/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 21:13:45 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[web hosting]]></category>

		<guid isPermaLink="false">http://iamnotrobot.com/?p=1</guid>
		<description><![CDATA[As you can see, my blog has been &#8230; DELETED That&#8217;s ok.  &#8221; every new beginning comes from some other beginning&#8217;s end. &#8220;]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fiamnotrobot.com%2F2008%2F10%2Fhello-world%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fiamnotrobot.com%2F2008%2F10%2Fhello-world%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>As you can see, my blog has been &#8230; DELETED <img src='http://iamnotrobot.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
That&#8217;s ok. </p>
<p>&#8221; every new beginning comes from some other beginning&#8217;s <a href="http://www.youtube.com/watch?v=KdmLmIArqWM">end</a>. &#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://iamnotrobot.com/2008/10/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
