<?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>Thinking In Rails &#187; Hosting</title>
	<atom:link href="http://thinkinginrails.com/category/hosting/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkinginrails.com</link>
	<description>A Perl Programmer&#039;s Exploration of The World of Ruby on Rails</description>
	<lastBuildDate>Fri, 20 Jan 2012 19:17:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hosted Rails For Easy Staging and Deployment</title>
		<link>http://thinkinginrails.com/2010/04/hosted-rails-for-easy-deployment/</link>
		<comments>http://thinkinginrails.com/2010/04/hosted-rails-for-easy-deployment/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 04:21:17 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=252</guid>
		<description><![CDATA[I&#8217;m not always hot on the &#8220;freemium&#8221; type sites that give you a wee tiny bit of functionality for free, but as soon as you want to use it to do something more interesting (or use an expanded set of functionality), it&#8217;s a pay service.  Probably because I&#8217;m cheap, but also it seems a bit [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not always hot on the &#8220;freemium&#8221; type sites that give you a <em>wee</em> tiny bit of functionality for free, but as soon as you want to use it to do something more interesting (or use an expanded set of functionality), it&#8217;s a pay service.  Probably because I&#8217;m cheap, but also it seems a bit of a tease.  Of course, I use a lot of these type of services myself.  I have the non-pro Flickr, non-pro Evernote, and also non-pro Dropbox in my daily repertoire of tools, and on my list of &#8220;stuff to pay for when I have a few extra bucks at the end of the month&#8221;.</p>
<p>Heroku, sadly, has turned into yet-another one of these invaluable freemium tools.</p>
<p>For my referee site project, I use two different modes of development.  First is the standard <a href="http://yourworkflow.ca/">workflow</a> of running &#8220;script/server&#8221; on my laptop in a terminal window, the default SQLite database that rails 2 uses out of the box, and switching between an editor and a web browser.  Code changes are checked in locally to git.</p>
<p>For &#8220;public&#8221; code I set up a free account on Heroku, installed a gem, and just use git to push both code and database up to the cloud for public consumption.  I have yet to set up a &#8220;real&#8221; server for running a rails app.  There are a bunch of different ways to do it if you have your own server such as:</p>
<ul>
<li><a href="http://nginx.org/">NGINX</a></li>
<li><a href="http://www.modrails.com/">Phusion Passenger</a> (mod_rails)</li>
<li><a href="http://rubyforge.org/projects/mongrel/">Mongrel</a></li>
</ul>
<p>Lets be honest though, unless you&#8217;re a sysadmin, and have your own machine, these are a lot to deal with as far as setting them up <em>well</em>.  With &#8220;well&#8221; being the key word.</p>
<p>There are also some other cloud services and rails specific hosting services:</p>
<ul>
<li><a href="http://heroku.com">Heroku</a></li>
<li><a href="http://engineyard.com">Engine Yard</a></li>
</ul>
<p>Also a <em>ton</em> of &#8220;normal&#8221; hosts include Ruby on Rails support by default, but without some of the nicities that Engine Yard and Heroku give you.  These are the services that you use until you get slashdotted/dugg/redditted/fireballed/etc and decide that you need something a bit more &#8220;elastic&#8221;.</p>
<p>My point though, is that if you just want to get your rails up up and on the internet, and you don&#8217;t want to deal with 99% of the stuff that you&#8217;d have to mess with if you were setting this up on your own server (ie: a VPS or hosted server).  If you don&#8217;t believe me, the documentation and front page makes it very obvious just how easy the develop/deploy cycle is.</p>
<p>It&#8217;s not all wine and roses though&#8230;</p>
<p><strong>Heroku &#8220;Gotchas&#8221;</strong></p>
<p>There are a couple of gotchas I found.  On the technical side, something I came across was that because on the backend Heroku uses postgresql as their database, the &#8220;heroku db:push&#8221; command imports data from the local sqlite database, there&#8217;s a chance that something will be inconsistant.  In my case I somehow managed to have an issue with case sensitivity, and while my development SQLite database was called &#8220;fields&#8221; (and all the convention over configuration knew how to find it and use it just fine) but the postgreSQL database on Heroku was called &#8220;Fields&#8221;, which was <em>not</em> found by the system.  I had to add a &#8220;set_table_name&#8221; line to my field.rb file to fix this.  Probably a user error and not a heroku error per-se, but something to watch out for when swapping between two different databases.</p>
<p>The other one is either a good of bad thing.  If you&#8217;re like me and use Heroku for a quick and dirty host to show a client without having to run your own server or deal with a bunch of configuration, when the client says &#8220;Ok, now lets put it out there for real&#8221;, you can just say &#8220;Ok, pay some money and we&#8217;ll upgrade the heroku account&#8221;, and your workflow stays the same, but you get access to all the fun stuff that Heroku wants your credit card to use <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;m sure there are other solutions out there, but none that I&#8217;ve found so far as easy and <em>pragmatic </em>as Heroku or Engine Yard.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2010/04/hosted-rails-for-easy-deployment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discovering Ruby With Ruby Warrior</title>
		<link>http://thinkinginrails.com/2009/05/discovering-ruby-with-ruby-warrior/</link>
		<comments>http://thinkinginrails.com/2009/05/discovering-ruby-with-ruby-warrior/#comments</comments>
		<pubDate>Fri, 15 May 2009 02:55:04 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=46</guid>
		<description><![CDATA[Thanks to the FV.rb last night I discovered Ruby Warrior, a neat and fun way of learning ruby.  It goes like this&#8230;. First, head to http://github.com/ryanb/ruby-warrior/tree/master and download the tree by using &#8220;git clone&#8220;, then simply run &#8220;bin/rubywarrior&#8221; out of the main ruby-warrior directory that the git clone command creates.  The first run will create [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_47" class="wp-caption alignright" style="width: 250px"><img class="size-full wp-image-47" title="Code from Level 6" src="http://thinkinginrails.com/wp-content/uploads/2009/05/warrior.png" alt="Code from Level 6" width="240" height="299" align="right"/><p class="wp-caption-text">Code from Level 6</p></div>
<p>Thanks to the <a href="http://www.meetup.com/fvrb-org/">FV.rb</a> last night I discovered <a href="http://github.com/ryanb/ruby-warrior/tree/master">Ruby Warrior</a>, a neat and fun way of learning ruby.  It goes like this&#8230;.</p>
<p>First, head to <a href="http://github.com/ryanb/ruby-warrior/tree/master"><tt>http://github.com/ryanb/ruby-warrior/tree/master</tt></a> and download the tree by using &#8220;<tt>git clone</tt>&#8220;, then simply run &#8220;<tt>bin/rubywarrior</tt>&#8221; out of the main ruby-warrior directory that the git clone command creates.  The first run will create a profile and set up the initial part of the &#8220;game&#8221;.</p>
<p>The &#8220;game&#8221; is a bit like the old adventure text games, with a simple ASCII &#8220;dungeon&#8221; that you see your guy move through, and as the levels progress you will encounter monsters, harder monsters, captives to rescue, and so on as you move from one side of the dungeon to the stairs on the other side.  The system is turn based, so you are basically creating yourself a little state machine.  You basically check to see if there&#8217;s something in front of you and if not walk, if it&#8217;s an enemy, attack, etc.</p>
<p>To do this you end up doing something like this:</p>
<ol>
<li>You look at the README file in the <tt>ruby-warrior/beginner-tower/level-001/</tt> directory.  You may have &#8220;intermediate-tower&#8221; instead of beginner depending on the level you chose during the initial setup.</li>
<li>Follow what the README file says and edit the file <tt>ruby-warrior/beginner-tower/level-001/player.rb</tt> adding code to make your warrior move and fight.</li>
<li>Run <tt>bin/rubywarrior</tt> and see how well your warrior moves and fights.  It will either succeed and allow you to continue to the next level (in which case go to step 1, substituting the right number in the &#8220;<tt>level-00N</tt>&#8221; directory), or you will fail, in which case, re-edit the warrior.rb file and try again.</li>
</ol>
<p>The game isn&#8217;t for complete and total programming n00bs, but might be a bit simple for people who know programming, but not ruby <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   It starts out with simple commands and simple if/then/else control structures.  However, it does make it cool and interesting enough that it has kept my interest for at least until now.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2009/05/discovering-ruby-with-ruby-warrior/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Ins and Outs of Serving Rails</title>
		<link>http://thinkinginrails.com/2009/05/the-ins-and-outs-of-serving-rails/</link>
		<comments>http://thinkinginrails.com/2009/05/the-ins-and-outs-of-serving-rails/#comments</comments>
		<pubDate>Sat, 02 May 2009 00:16:33 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Instructions]]></category>

		<guid isPermaLink="false">http://thinkinginrails.com/?p=24</guid>
		<description><![CDATA[One of the biggest failures I found starting in Rails was the lack of a standard for hosting.  In the mod_perl or php world, the standard apache distribution has everything needed built in to the standard distribution, and you&#8217;d be hard pressed to find a hosting system (of any size) that doesn&#8217;t have them. Rails [...]]]></description>
			<content:encoded><![CDATA[<p>One of the biggest failures I found starting in Rails was the lack of a standard for hosting.  In the <a href="http://perl.apache.org">mod_perl</a> or <a href="http://php.net">php</a> world, the standard apache distribution has everything needed built in to the standard distribution, and you&#8217;d be hard pressed to find a hosting system (of any size) that doesn&#8217;t have them.</p>
<p>Rails on the other hand, seemed to have a boatload of ways to serve itself.  There doesn&#8217;t seem to be a &#8220;standard&#8221; webserver.  You have <a href="http://mongrel.rubyforge.org/">mongrel</a>, <a href="http://nginx.net/">nginx</a>, phusion passenger (<a href="http://www.modrails.com/">mod_rails</a>), <a href="http://www.lighttpd.net/">lighttp</a>&#8230; the list goes on.  And it doesn&#8217;t seem that there&#8217;s an accepted &#8220;proper&#8221; way to do the webserving yet.  Maybe it&#8217;s a case of different tools for different cases, maybe it&#8217;s just a symptom of a system that&#8217;s relatively young (compared to the apache/perl/php world).</p>
<p><span id="more-24"></span></p>
<p>Obviously the build in webserver (<tt>ruby script/server</tt>) will always be there, but if you&#8217;ve got your first app up and ready, and your hosting provider either doesn&#8217;t supply rails hosting as an option, or their setup isn&#8217;t up to the task I discovered an interesting (and most importantly, <strong>free</strong>) solution.</p>
<p>Check out <a href="http://heroku.com/">Heroku</a>.  It&#8217;s a free, online hosting system with a fairly unique method of using git to allow you to simply run &#8220;<tt>git push</tt>&#8221; in your app directory and have any changes pushed up to their hosting cloud.  Now granted, they are a commercial company and you only get the equivalent of the lowest level of hosting (a &#8220;Blossom&#8221; plan with 5mb of disk space), but this is perfectly adequate for a personal project or learning application.  And again, it&#8217;s <em>free</em> <img src='http://thinkinginrails.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Dead Programmer Society has <a href="http://deadprogrammersociety.blogspot.com/2009/04/heroku-why-havent-i-been-using-you-till.html">a nice write up on the whole deal</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinginrails.com/2009/05/the-ins-and-outs-of-serving-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

