<?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>xambr::blog &#187; ramaze</title>
	<atom:link href="http://blog.xambr.com/tag/ramaze/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xambr.com</link>
	<description>crafting my thoughts</description>
	<lastBuildDate>Tue, 20 Jul 2010 18:57:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Ramaze Error Handling</title>
		<link>http://blog.xambr.com/2010/07/19/ramaze-error-handling/</link>
		<comments>http://blog.xambr.com/2010/07/19/ramaze-error-handling/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 02:39:37 +0000</pubDate>
		<dc:creator>max.rb</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[handling 404]]></category>
		<category><![CDATA[ramaze]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.xambr.com/?p=281</guid>
		<description><![CDATA[I recently had to build custom 404 &#38; exception handlers for a Ramaze application. There are several useful discussions on the Ramaze Google Group regarding this topic but I thought I&#8217;d synthesize the solution here for the sake of convenience. Handling 404 Errors Ramaze has a built-in controller action to handle 404 errors; it presents a [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to build custom 404 &amp; exception handlers for a Ramaze application. There are several useful discussions on the <a href="http://groups.google.com/group/ramaze" target="_blank">Ramaze Google Group</a> regarding this topic but I thought I&#8217;d synthesize the solution here for the sake of convenience.</p>
<h2>Handling 404 Errors</h2>
<p><a href="http://ramaze.net/" target="_blank">Ramaze</a> has a built-in controller action to handle 404 errors; it presents a vanilla page stating &#8216;No action found at: <code>/xyz</code>&#8216;. Overriding this action is easy and <a href="http://doc.rubyists.com/ramaze%2binnate/Innate/Node.html#action_missing-instance_method" target="_blank">well documented</a> but there are a couple of things that might want to consider.</p>
<p>First, if you would like all 404 errors across your application to be handled by a single action, you will need to add your handling code to the base controller.</p>
<p>Second, using a view file corresponding to the controller action does not quite work. While the view is correctly rendered when the 404 occurs directly under a path mapped to the 404 handler&#8217;s controller (eg. <code>/my_missing_action</code>) it is not rendered for 404 errors occurring under paths mapped to other controllers (eg. <code>/users/my_missing_action</code>).</p>
<p>A workaround for this is to use the <code><a href="http://doc.rubyists.com/ramaze%2binnate/Innate/Helper/Render.html#render_file-instance_method" target="_blank">render_file</a></code> method to manually render a view you&#8217;ve created. I have not done due diligence on this problem so I cannot tell you why it occurs &#8211; maybe it is a bug or maybe (likely) I&#8217;m missing something. If anyone has an explanation or a better work around I&#8217;d love to hear it.</p>
<h3>Source for a Custom 404 Handler</h3>
<p><script src="http://gist.github.com/482339.js"> </script></p>
<h2>Handling Exceptions</h2>
<h3>Routing Exceptions</h3>
<p><a href="http://ramaze.net/" target="_blank">Ramaze</a> also has a built-in exception handler which presents a developer-friendly stack trace (one which I&#8217;m sure you will want to hide for the end-users). The <a href="http://groups.google.com/group/ramaze" target="_blank">Ramaze Google Group</a> discussions <a href="http://groups.google.com/group/ramaze/browse_thread/thread/7d90b3f24b80d01e/c92b7eaae3ab73b3?lnk=gst&amp;q=exception+handling#c92b7eaae3ab73b3" target="_blank">here</a> and <a href="http://groups.google.com/group/ramaze/browse_thread/thread/66f7246c29b1a20c/8d0fc5300ebdc34f?lnk=gst&amp;q=exception+handling#8d0fc5300ebdc34f" target="_blank">here</a> talk about how to override this default handler. It boils down to using <code><a href="http://doc.rubyists.com/ramaze%2binnate/Rack/RouteExceptions.html#route-class_method" target="_blank">Rack::RouteExceptions.route(exception, to)</a>;</code> a method that takes the type of exception to route and the path of the action to route it to.</p>
<p>For example, to route all exceptions to the same controller you could use (as stated by Lars Olsson <a href="http://groups.google.com/group/ramaze/browse_thread/thread/7d90b3f24b80d01e/c92b7eaae3ab73b3?lnk=gst&amp;q=exception+handling#c92b7eaae3ab73b3" target="_blank">here</a>):</p>
<pre>Rack::RouteExceptions.route(Exception, MyController.r(:error))</pre>
<p>Alternatively, to handle all IOError exceptions separately you could use:</p>
<pre>Rack::RouteExceptions.route(IOError, MyController.r(:io_error))
Rack::RouteExceptions.route(Exception, MyController.r(:error))</pre>
<p>Note the order of the calls to route is important. You must route the most specific exceptions first or they will be routed to more general handlers specified before them.</p>
<p>Unlike the 404 error handler, using a standard view file <strong>does </strong>work here.</p>
<h3>The Exception Object</h3>
<p>To obtain the exception object within the controller action you can call:</p>
<pre>@error = request.env[Rack::RouteExceptions::EXCEPTION]</pre>
<h3>Source for a Custom Exception Handler</h3>
<p><script src="http://gist.github.com/482348.js"> </script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xambr.com/2010/07/19/ramaze-error-handling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Ramaze with Unicorn, Nginx and God</title>
		<link>http://blog.xambr.com/2010/01/16/running-ramaze-with-unicorn-nginx-and-god/</link>
		<comments>http://blog.xambr.com/2010/01/16/running-ramaze-with-unicorn-nginx-and-god/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 01:19:15 +0000</pubDate>
		<dc:creator>max.rb</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[god]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[ramaze]]></category>
		<category><![CDATA[unicorn]]></category>

		<guid isPermaLink="false">http://blog.xambr.com/?p=205</guid>
		<description><![CDATA[I&#8217;ve been meaning to write a post about running a Ramaze website under a reasonable setup for a long time now so I&#8217;m happy to finally get to it. I&#8217;m going to focus my attention on the configuration of the setup vs the installation of the software - RACK, Ramaze, Unicorn and God are ruby gems and there are plenty of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to write a post about running a <a href="http://ramaze.net/" target="_blank">Ramaze</a> website under a reasonable setup for a long time now so I&#8217;m happy to finally get to it. I&#8217;m going to focus my attention on the configuration of the setup vs the installation of the software - <a href="http://rack.rubyforge.org/" target="_blank">RACK</a>, <a href="http://ramaze.net/" target="_blank">Ramaze</a>, <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> and <a href="http://god.rubyforge.org/" target="_blank">God</a> are ruby gems and there are plenty of good articles about installing <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a> out there already.</p>
<h2>What You Need</h2>
<p>I&#8217;ve included the version number of the software I&#8217;ve tested this setup with but I suspect this configuration will work with newer versions as well (and probably older versions too).</p>
<ol>
<li><a href="http://rack.rubyforge.org/" target="_blank">RACK</a> (web server interface)
<ul>
<li>1.0.1</li>
</ul>
</li>
<li><a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> (http server)
<ul>
<li>0.95.2</li>
</ul>
</li>
<li><a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a> (front end reverse proxy server)
<ul>
<li>0.6.36</li>
</ul>
</li>
<li><a href="http://god.rubyforge.org/" target="_blank">God</a> (process monitoring)
<ul>
<li>0.7.13</li>
</ul>
</li>
<li><a href="http://ramaze.net/" target="_blank">Ramaze</a> (web framework)
<ul>
<li>2009-05</li>
</ul>
</li>
</ol>
<h2>Some Assumptions</h2>
<p>While the config files below make the following assumptions you should be able to handle any discrepancies by altering the paths or changing the run user.</p>
<ol>
<li>Nginx is configured to read configuration files from its <code>conf/sites-enabled</code> directory
<ul>
<li>Add <code>include &lt;path to nginx install&gt;/conf/sites-enabled/*;</code> to the <code>http</code> section of your primary <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a> config file to enable this</li>
</ul>
</li>
<li>Your website will run under the www-data user</li>
<li>The <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a>, <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> and <a href="http://god.rubyforge.org/" target="_blank">God</a> config files exist within the <code>config</code> directory of your <a href="http://ramaze.net/" target="_blank">Ramaze</a> website</li>
<li>The <a href="http://rack.rubyforge.org/" target="_blank">RACK</a> config file (config.ru) is in the root of your website</li>
<li>You&#8217;ve created the <code>log</code> and <code>tmp/pids</code> directories underneath the root of your website</li>
</ol>
<h2>Configuring the Pieces</h2>
<h3>1. <a href="http://rack.rubyforge.org/">RACK</a></h3>
<p>This config file is actually a very simple ruby file, its main purpose in this situation is to load your website&#8217;s <code>app.rb</code> via the require statement. This in turn loads the rest of your site.<br />
<script src="http://gist.github.com/278861.js?file=config.ru"></script></p>
<h3>3. <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a></h3>
<p>While I&#8217;ve commented the major parts of the configuration file inline, I highly recommend checking out the <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn website</a> and this <a href="http://unicorn.bogomips.org/examples/unicorn.conf.rb" target="_blank">sample configuration file</a> for more details/features.  <script src="http://gist.github.com/278861.js?file=unicorn.conf"></script></p>
<h3>2. <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a></h3>
<p>You can find more info about configuring Nginx <a href="http://wiki.nginx.org/NginxConfiguration">here</a>.  If assumptions #2 &amp; #4 are true then you&#8217;ll need to create a symlink in the <code>&lt;path-to-nginx-install&gt;/conf/sites-enabled/*</code> directory to your <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a> config in the config directory under the root of your website. You can do this by executing</p>
<pre class="code">ln -s /var/www/apps/my.domain.com/config/nginx.conf &lt;path-to-nginx-install&gt;/conf/sites-enabled/my.domain.com</pre>
<p><script src="http://gist.github.com/278861.js?file=nginx.conf"></script></p>
<h3>4. God</h3>
<p>As with the RACK and Unicorn config files, this one is also written in Ruby. The God home page has a much more detailed breakdown of the config file and is definitely worth a read. <script src="http://gist.github.com/278861.js?file=god.conf"></script></p>
<h2>Flicking the Switch</h2>
<p>Once you have your configuration files in place and your website on your target server you&#8217;re going to need to turn it all on. The first step is to tell <a href="http://god.rubyforge.org/" target="_blank">God</a> to keep an eye on your <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> process and the second step is to cycle <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a> forcing it to pickup your new website&#8217;s config file.</p>
<h3>Alerting <a href="http://god.rubyforge.org/" target="_blank">God</a></h3>
<p>The first thing to do is start <a href="http://god.rubyforge.org/" target="_blank">God</a> and have it monitor your master <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> process for your new website.  If <a href="http://god.rubyforge.org/" target="_blank">God</a> is not already running you can start it using:</p>
<pre class="code">god --log-level=debug</pre>
<p>To have it start monitoring your <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> process, execute the following:</p>
<pre class="code">sudo god load /var/www/apps/my.domain.com/config/god.conf</pre>
<h3>Cycling <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a></h3>
<p>Cycling <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a> is something that cries out for a script so here is a simple one:<br />
<script src="http://gist.github.com/278905.js?file=cycle-nginx.sh"></script></p>
<h2>Dealing with Errors</h2>
<p>After flicking the switch for the first time under this setup I&#8217;ve run into a 502 bad gateway error multiple times. Each time it was because I had forgotten to create the required <code>tmp/pids</code> or <code>log</code> directories under the website root. If you do run into a 502 its probably because <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> had trouble starting up or <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a> is not pointing to the right spot.</p>
<h4>Debugging</h4>
<p>Check the <a href="http://god.rubyforge.org/" target="_blank">God</a> logs for your website by executing:</p>
<pre class="code">god --log-level debug log my.domain.com</pre>
<p>That will tell you if <a href="http://god.rubyforge.org/" target="_blank">God</a> has managed to start the <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> process successfully. If it has then checkout the <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> error logs in the log directory of your website. If it cannot start the process and doesn&#8217;t indicate why then try executing the <a href="http://unicorn.bogomips.org/" target="_blank">Unicorn</a> startup command in a shell directly (that should at least give you the error message Unicorn is generating).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xambr.com/2010/01/16/running-ramaze-with-unicorn-nginx-and-god/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ramaze Partials with Etanni</title>
		<link>http://blog.xambr.com/2009/11/26/ramaze-partials-with-etanni/</link>
		<comments>http://blog.xambr.com/2009/11/26/ramaze-partials-with-etanni/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 06:14:32 +0000</pubDate>
		<dc:creator>max.rb</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[etanni]]></category>
		<category><![CDATA[ramaze]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.xambr.com/?p=176</guid>
		<description><![CDATA[Innate/Ramaze Version: 2009-10 Template Engine: Etanni The title of this blog post is a little inaccurate as what I&#8217;m actually going to describe are Etanni partials but considering Etanni is the default template engine in Innate/Ramaze 2009-10 I figured &#8220;Ramaze Partials&#8221; was a fair generalization. Etanni partials are easy to work with and as Pistos [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Innate/Ramaze Version:</strong> 2009-10<br />
<strong>Template Engine:</strong> Etanni</p>
<p>The title of this blog post is a little inaccurate as what I&#8217;m actually going to describe are Etanni partials but considering Etanni is the default template engine in Innate/Ramaze 2009-10 I figured &#8220;Ramaze Partials&#8221; was a fair generalization.</p>
<p>Etanni partials are easy to work with and as Pistos points out below they are documented in the <a href="http://doc.rubyists.com/ramaze+innate/Innate/Helper/Render.html#render_partial-instance_method">rdocs</a>. That said, when I went about looking for info on them (using Google) I missed the rdocs and could only find brief mentions of a &#8220;render helper&#8221; in the blogosphere. My hope is that this post will make it easier to find this information.</p>
<h2>The Render Helper</h2>
<p>This <a href="http://github.com/manveru/innate/blob/master/lib/innate/helper/render.rb" target="_blank">render helper</a> can be found in the <a href="http://github.com/manveru/innate">Innate code base</a> &#8211; it is clearly commented and worth a look if you&#8217;ve got a few minutes. There are 3 methods that this helper provides to aid you in the creation of your partials:</p>
<ol>
<li><span style="font-family: monospace; ">render_partial</span></li>
<li><span style="font-family: monospace;">render_view</span></li>
<li><span style="font-family: monospace;">render_file</span></li>
</ol>
<p>I will only cover <code>render_partial</code> as it is the only one that I&#8217;ve needed to use thus far.</p>
<h2>render_partial</h2>
<p><code>render_partial(action_name, variables = {})</code></p>
<p>The <code>action_name</code> parameter references a controller method and the <code>variables</code> parameter is a hash which is turned into members which are locally accessible within that method. Note that <code>action_name</code> doesn&#8217;t have to actually have a method declaration within a controller &#8211; it can simply be the name of a view.</p>
<h3>Example</h3>
<p>Here is the example code for a rendering contact information via an Etanni partial:</p>
<p><script src="http://gist.github.com/243258.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xambr.com/2009/11/26/ramaze-partials-with-etanni/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Rails Alternatives: Merb, Sinatra &amp; Ramaze</title>
		<link>http://blog.xambr.com/2009/05/28/rails-alternatives-merb-sinatra-ramaze/</link>
		<comments>http://blog.xambr.com/2009/05/28/rails-alternatives-merb-sinatra-ramaze/#comments</comments>
		<pubDate>Thu, 28 May 2009 05:35:53 +0000</pubDate>
		<dc:creator>max.rb</dc:creator>
				<category><![CDATA[Discoveries]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[merb]]></category>
		<category><![CDATA[ramaze]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>
		<category><![CDATA[web framework]]></category>

		<guid isPermaLink="false">http://blog.xambr.com/?p=132</guid>
		<description><![CDATA[Over the past few months I&#8217;ve been on the hunt for a Ruby web framework to replace Rails as my weapon of choice when building an online presence. Rails struck me as being overly heavy in this context and I wanted something lighter. I was primarily looking for a web framework that, out of the [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few months I&#8217;ve been on the hunt for a Ruby web framework to replace <a href="http://rubyonrails.org/" target="_blank">Rails</a> as my weapon of choice when building an online presence. <a href="http://rubyonrails.org/" target="_blank">Rails</a> struck me as being overly heavy in this context and I wanted something lighter.</p>
<p>I was primarily looking for a web framework that, out of the box, supported a healthy variety of template/ORM options, offered flexible routing and good layout/view support.</p>
<p>My search took me through the green pastures of <a href="http://merbivore.com/" target="_blank">Merb</a>, into <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a>&#8216;s glitzy jazz hall and finally into the land of <a href="http://ramaze.net/" target="_blank">Ramaze</a>.</p>
<h2>Merb&#8217;s Green Pastures</h2>
<p>I had heard so many good things about <a href="http://merbivore.com/" target="_blank">Merb</a> that starting with it seemed like a no brainer. The rewrite of <a href="http://www.xambr.com/" target="_blank">xambr.com</a> using <a href="http://merbivore.com/" target="_blank">Merb</a> was mostly an enjoyable experience &#8211; <a href="http://merbivore.com/" target="_blank">Merb</a> was able to do everything I was doing with <a href="http://rubyonrails.org/" target="_blank">Rails</a> out of the box.</p>
<p>There were annoying holes in the documentation but nothing that couldn&#8217;t be filled in through a bit of spelunking in the code base &#8211; which was pretty clean and easy to understand (at least the parts I looked at were).</p>
<p>Of course, a couple days after finishing the rewrite of <a href="http://www.xambr.com/" target="_blank">xambr.com</a> I read that <a href="http://merbivore.com/" target="_blank">Merb</a> was to be merged into <a href="http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3" target="_blank">Rails v3</a>. At first I was a little dismayed but I&#8217;ve come to the opinion that the merge is a good thing &#8211; <a href="http://rubyonrails.org/" target="_blank">Rails</a> will definitely benefit from it and I think <a href="http://merbivore.com/" target="_blank">Merb&#8217;s</a> spot will be taken by the very capable, if under-appreciated, <a href="http://ramaze.net/" target="_blank">Ramaze</a>.</p>
<p>I ran <a href="http://www.xambr.com/" target="_blank">xambr.com</a> on Merb for about 3 months during which time I dabbled in <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> (previously blogged about <a href="http://blog.xambr.com/2009/04/07/getting-classy-with-sinatra/" target="_blank">here</a>). These first experiences with <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> were very positive and I liked the fact that it was lighter than Merb &#8211; so I figured I&#8217;d give it a shot.</p>
<h2>Getting Classy with Sinatra [Redux]</h2>
<p>While the rewrite of <a href="http://www.xambr.com/" target="_blank">xambr.com</a> in Merb had taken about 10 hours the rewrite in <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> took 1/2 that time&#8230; or at least 90% of it did.</p>
<p>I got hung up when trying to figure out how to have multiple view sections within a single layout (like <a href="http://merbivore.com/" target="_blank">Merb&#8217;s</a> throw/catch system). Several hours of searching and tinkering didn&#8217;t turn anything up other than a tidbit on <a href="http://github.com/" target="_blank">Github</a> using <a href="http://haml.hamptoncatlin.com/" target="_blank">Haml</a> &#8211; which I was not able to get working with <a href="http://www.kuwata-lab.com/erubis/" target="_blank">Erubis</a> (and I didn&#8217;t want to switch to <a href="http://haml.hamptoncatlin.com/" target="_blank">Haml</a>).</p>
<p>Its very likely that with a bit more poking around, maybe hitting up the mailing list or IRC, a solution could have been found but I didn&#8217;t want to spend any more time with it &#8211; as mentioned above I was looking for a web framework that did all of this out of the box.</p>
<p>So I was a little disappointed, but I still think <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> is a great little web framework &#8211; just not for online presences (or at least not <a href="http://www.xambr.com/" target="_blank">xambr.com</a>).</p>
<h2>Ramaze FTW</h2>
<p>I stumbled upon <a href="http://ramaze.net/" target="_blank">Ramaze</a> several months before starting this little adventure but never gave it the look it deserved. Revisiting it was the best thing I&#8217;ve done all year (code wise anyway). How can one possibly argue with &#8220;Any ruby, any adapter, any ORM and any template engine&#8221; &#8211; contortionists everywhere are jealous of <a href="http://ramaze.net/" target="_blank">Ramaze&#8217;s</a> flexibility.</p>
<p>Rewriting <a href="http://www.xambr.com/" target="_blank">xambr.com</a> in <a href="http://ramaze.net/" target="_blank">Ramaze</a> took about the same time as it did in <a href="http://merbivore.com/" target="_blank">Merb</a> &#8211; roughly 10 hours. I started off using <a href="http://www.kuwata-lab.com/erubis/" target="_blank">Erubis</a> but ultimately ended up using <a href="http://github.com/manveru/nagoro/tree/master" target="_blank">Nagoro</a> &#8211; mainly because I liked its &#8220;Page Elements&#8221; which are like partials only better. <a href="http://github.com/manveru/nagoro/tree/master" target="_blank">Nagoro</a> is pretty close to <a href="http://www.kuwata-lab.com/erubis/" target="_blank">Erubis</a> but I&#8217;d say its a little more natural if you&#8217;re coming at them both with a fresh slate (due to its substitution syntax).</p>
<p><a href="http://ramaze.net/" target="_blank">Ramaze</a> has a great community too &#8211; a question I posed on the <a href="http://ramaze.net/" target="_blank">Ramaze</a> IRC channel about some odd <a href="http://github.com/manveru/nagoro/tree/master" target="_blank">Nagoro</a> behavior got an immediate, friendly response from <a href="http://ramaze.net/" target="_blank">Ramaze&#8217;s</a> creator, <a href="http://github.com/manveru" target="_blank">Michael <span id="author">Fellinger</span></a>. Now, I&#8217;m not a frequenter of IRC channels in general so I wouldn&#8217;t know if getting friendly answers from a technology&#8217;s creator is the norm but to me it was a much appreciated surprise (thanks <a href="http://github.com/manveru" target="_blank">Michael</a>!).</p>
<p>The <a href="http://ramaze.net/learn" target="_blank">documentation</a> for <a href="http://ramaze.net/" target="_blank">Ramaze</a> isn&#8217;t quite complete but its pretty close &#8211; more so than for <a href="http://merbivore.com/" target="_blank">Merb</a> in my opinion. That said it does seem to be less the subject of blog posts than <a href="http://merbivore.com/" target="_blank">Merb</a> (although I think that will all change in the coming months). Its got a <a href="http://book.ramaze.net/" target="_blank">book</a> (albeit an incomplete one), a ton of well written <a href="http://github.com/manveru/ramaze/tree/master/examples" target="_blank">examples</a> of ranging in size from hello world to a <a href="http://github.com/manveru/sociar/tree/master" target="_blank">social networking site</a> and a great <a href="http://blog.purepistos.net/index.php/2008/11/18/ramaze-by-example/" target="_blank">set of blog posts</a> by <a href="http://blog.purepistos.net/" target="_blank">Pistos</a>.</p>
<p>All my gushing aside, I did run into a bit of trouble finding a good end-to-end deployment solution. This wasn&#8217;t a bad thing though &#8211; it forced me to get to know <a href="http://rack.rubyforge.org/" target="_blank">Rack</a> a little better and look into process monitoring solutions. In the coming days (ok maybe weeks&#8230;) I&#8217;ll be posting my solution (which involves a couple of <a href="http://mongrel.rubyforge.org/" target="_blank">mongrels</a> under <a href="http://god.rubyforge.org/">god</a>&#8216;s watchful eye) &#8211; its not rocket science by any stretch of the imagination but I did run into a couple of snags&#8230;</p>
<h2>In Short&#8230;</h2>
<p>To sum it all up for those of you who&#8217;d rather read the back of the envelope (thats me!) here is how I&#8217;d characterize each of these Ruby web frameworks:</p>
<ul>
<li><a href="http://merbivore.com/" target="_blank">Merb</a>
<ul>
<li>Skip it and check out <a href="http://ramaze.net/" target="_blank">Ramaze</a> instead
<ul>
<li><a href="http://merbivore.com/" target="_blank">Merb</a> will likely give you a leg up on Rails 3 but <a href="http://ramaze.net/" target="_blank">Ramaze</a> will serve you better in the &#8220;alternative to Rails&#8221; context.</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a>
<ul>
<li>Great place to start if you&#8217;re new to web development
<ul>
<li>The <a href="http://www.sinatrarb.com/intro.html" target="_blank">README</a> page is close to a one stop shop for everything you need to get up and singing</li>
</ul>
</li>
<li>The handy multi-tool you need to get small jobs done quickly
<ul>
<li>eg. <a href="http://mwrc2009.confreaks.com/13-mar-2009-11-05-in-a-world-of-middleware-who-needs-monolithic-applications-jon-crosby.html" target="_blank">Rack middleware</a>, tiny websites, web services, etc</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://ramaze.net/" target="_blank">Ramaze</a>
<ul>
<li>The fine wine of Ruby web frameworks
<ul>
<li>It requires a bit more work but its very rewarding</li>
</ul>
</li>
<li>Fluff-less</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.xambr.com/2009/05/28/rails-alternatives-merb-sinatra-ramaze/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
