<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-3545886534042322597</id><updated>2008-08-01T09:43:38.399-07:00</updated><title type="text">Just In Time</title><link rel="alternate" type="text/html" href="http://jit.nuance9.com/" /><link rel="next" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default?start-index=26&amp;max-results=25" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><geo:lat>31.817344</geo:lat><geo:long>-102.423151</geo:long><link rel="self" href="http://feeds.feedburner.com/nuance9/jit" type="application/atom+xml" /><feedburner:emailServiceId>925956</feedburner:emailServiceId><feedburner:feedburnerHostname>http://www.feedburner.com</feedburner:feedburnerHostname><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-7539126679171872384</id><published>2008-07-16T08:45:00.000-07:00</published><updated>2008-07-16T08:49:08.968-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="education" /><category scheme="http://www.blogger.com/atom/ns#" term="google" /><title type="text">The Real Goal of Education</title><content type="html">Is education about memorizing facts?  No, it's about learning to learn.  It's about learning how to think.&lt;br /&gt;&lt;br /&gt;"...developers today code in something called Python, but when I was in school C was all the rage.&lt;span style="font-weight:bold;"&gt; The need for reasoning, though, remains constant&lt;/span&gt;..." - &lt;a href="http://feeds.feedburner.com/~r/blogspot/MKuf/~3/336599275/our-googley-advice-to-students-major-in.html"&gt;Our Googley advice to students: Major in learning &lt;/a&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=AlAU8J"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=AlAU8J" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=lalcqj"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=lalcqj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=50nzaj"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=50nzaj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=omh7Wj"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=omh7Wj" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/337201325/real-goal-of-education.html" title="The Real Goal of Education" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=7539126679171872384" title="1 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/7539126679171872384/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/7539126679171872384" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/7539126679171872384" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/07/real-goal-of-education.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-7296234539895008025</id><published>2008-06-23T18:55:00.001-07:00</published><updated>2008-06-23T19:11:46.405-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="datamapper" /><title type="text">DataMapper: Many-to-many</title><content type="html">You can define many-to-many associations using this syntax:&lt;br /&gt;&lt;br /&gt;#item.rb&lt;br /&gt;has n, :things, :through =&gt; Resource&lt;br /&gt;&lt;br /&gt;#thing.rb&lt;br /&gt;has n, :items, :through =&gt; Resource&lt;br /&gt;&lt;br /&gt;In this case it will create a table items_things to manage the assignments.  Easy enough.  Depending on the relationship you are mapping out, it may make more sense to use the :through =&gt; :model syntax.&lt;br /&gt;&lt;br /&gt;Now if you create an instance of an Item, you will get a method "things=".  At first I thought this would be how you would assign a new Thing to your Item.  Such as:&lt;br /&gt;&lt;br /&gt;@item = Item.get(1)&lt;br /&gt;@thing = Thing.get(1)&lt;br /&gt;@item.things = @thing&lt;br /&gt;&lt;br /&gt;FAIL!  If you try adding a single Thing to your Item with this method you will receive a failure that the class you sent did not have a map method defined.  Ah, ok.   That makes sense, things= is obviously plural and will want an array of things.  So how do you assign just one thing?&lt;br /&gt;&lt;br /&gt;If you are unsure, a handy tool is to remember the "methods" method.  So in this case you can try out:&lt;br /&gt;&lt;br /&gt;@item.methods&lt;br /&gt;&lt;br /&gt;You will see that you have not only a "things=" method, but also a plain old "things" method.  If you try:&lt;br /&gt;&lt;br /&gt;@item.things.methods&lt;br /&gt;&lt;br /&gt;You will see that you have a &lt;&lt; method, as should be expected.  So to add our single Thing to our Item we do:&lt;br /&gt;&lt;br /&gt;@item.things &lt;&lt; @thing&lt;br /&gt;&lt;br /&gt;That's it.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=DnFYQI"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=DnFYQI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=ycyINi"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=ycyINi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=Dq1z8i"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=Dq1z8i" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=luOIoi"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=luOIoi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/318537968/datamapper-many-to-many.html" title="DataMapper: Many-to-many" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=7296234539895008025" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/7296234539895008025/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/7296234539895008025" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/7296234539895008025" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/06/datamapper-many-to-many.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-2071619242030888669</id><published>2008-06-06T20:08:00.000-07:00</published><updated>2008-06-06T20:15:33.052-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="orm" /><category scheme="http://www.blogger.com/atom/ns#" term="datamapper" /><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><title type="text">DataMapper: Parent / Child Relationship</title><content type="html">I couldn't find an example at datamapper.org /docs for a parent child relationship.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After a little searching, I found the answer in the &lt;a href="http://github.com/sam/dm-core/tree/master/spec/integration/association_spec.rb"&gt;integration tests&lt;/a&gt;.  Here is the example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; class Node&lt;br /&gt;   include DataMapper::Resource&lt;br /&gt;&lt;br /&gt;   def self.default_repository_name&lt;br /&gt;     ADAPTER&lt;br /&gt;   end&lt;br /&gt;&lt;br /&gt;   property :id, Integer, :serial =&gt; true&lt;br /&gt;   property :name, String&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;     has n, :children, :class_name =&gt; 'Node', :child_key =&gt; [ :parent_id ]&lt;br /&gt;   belongs_to :parent, :class_name =&gt; 'Node', :child_key =&gt; [ :parent_id ]&lt;/span&gt;&lt;br /&gt; end&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Hope that helps someone else.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=icK0II"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=icK0II" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=I7aUFi"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=I7aUFi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=vCjCWi"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=vCjCWi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=5EWWIi"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=5EWWIi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/306550672/datamapper-parent-child-relationship.html" title="DataMapper: Parent / Child Relationship" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=2071619242030888669" title="5 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/2071619242030888669/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/2071619242030888669" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/2071619242030888669" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/06/datamapper-parent-child-relationship.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-2169472109761623914</id><published>2008-03-13T15:33:00.000-07:00</published><updated>2008-03-13T15:43:41.307-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><title type="text">Marshal data too short</title><content type="html">If you marshal data and then store it in a DB, make sure to either base64 encode it or store it in a binary data type (such as BLOB), otherwise it will probably cause errors.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=zHGXOQF"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=zHGXOQF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=xGy93Df"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=xGy93Df" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=VyTQ7Jf"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=VyTQ7Jf" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=lCIO4Lf"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=lCIO4Lf" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/251037281/marshal-data-too-short.html" title="Marshal data too short" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=2169472109761623914" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/2169472109761623914/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/2169472109761623914" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/2169472109761623914" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/03/marshal-data-too-short.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-8888189073701350254</id><published>2008-03-03T10:00:00.000-08:00</published><updated>2008-02-29T13:06:16.957-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><title type="text">Merb Monday: Vacation Edition</title><content type="html">I'm on vacation visiting family (with limited Internet access).  Back to semi-normal next week.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=VnSMpkE"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=VnSMpkE" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=lfVux3e"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=lfVux3e" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=nbTJdYe"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=nbTJdYe" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=BpzJile"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=BpzJile" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/243536475/merb-monday-vacation-edition.html" title="Merb Monday: Vacation Edition" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=8888189073701350254" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/8888189073701350254/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/8888189073701350254" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/8888189073701350254" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/03/merb-monday-vacation-edition.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-7804365641224006792</id><published>2008-02-25T13:27:00.000-08:00</published><updated>2008-02-25T13:47:44.062-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><title type="text">Merb Monday: The Leap Year Edition</title><content type="html">&lt;span style="font-weight: bold;font-size:130%;" &gt;News&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.merbivore.com/documentation.html"&gt;Official documentation&lt;/a&gt; has been updated to include 0.9.  Still a little light, but coming along.  If you would like to help, &lt;a href="http://gweezlebur.com/2008/2/1/so-you-want-to-contribute-to-merb-core-part-1"&gt;create your own git branch&lt;/a&gt; and have at it!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://gweezlebur.com/2008/2/19/michael-has_baby-true"&gt;Ivey had a baby&lt;/a&gt;.  Congratulations!&lt;br /&gt;&lt;br /&gt;Expect 0.9.1 (developer release) today (or soon).&lt;br /&gt;&lt;br /&gt;You get an "extra" day this week.  Use it wisely.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Teaser&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Code name: &lt;a href="http://github.com/wvl/merb_demos/tree/master"&gt;Merblets&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Q&amp;amp;A&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q: &lt;/span&gt;What!?  No RJS?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;A:&lt;/span&gt; You can do anything rjs can do with *.js.erb templates (&lt;span style="font-style: italic;"&gt;Answer by ezmobius&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; I read that Merb is template agnostic. What templates languages do I have available?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; erb out of the box (erubis), haml (merb_haml as a dependency in init.rb), markaby (&lt;span style="font-style: italic;"&gt;Answer by sqred&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; What does a named route in Merb look like?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; r.match("/login").to(:controller =&gt; "Sessions", :action =&gt; "new").name(:login)&lt;br /&gt;(&lt;span style="font-style: italic;"&gt;Answer by jodo&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; Does Merb have a debugger tool?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;A:&lt;/span&gt; You can use ruby-debug.  Start Merb with the -D option to enable ruby-debug support.&lt;br /&gt;Enter "debugger" somewhere in your code as a breakpoint.  (&lt;span style="font-style: italic;"&gt;Answer by jdempsey&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q: &lt;/span&gt;How do I find out what version of Merb I'm using?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; merb -v (&lt;span style="font-style: italic;"&gt;Answer by ezmobius&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; How can I see the current routes?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; merb -i&lt;br /&gt;      merb.show_routes&lt;br /&gt;      (&lt;span style="font-style: italic;"&gt;Answer by ezmobius&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; Can the cookie session be used for large production apps?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; As long as you don't store really sensitive info in the session then cookie sessions are fine (&lt;span style="font-style: italic;"&gt;Answer by ezmobius&lt;/span&gt;)&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=K8WAbWE"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=K8WAbWE" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=B8bKQ9e"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=B8bKQ9e" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=iV9YuSe"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=iV9YuSe" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=ytWzMDe"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=ytWzMDe" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/241118568/merb-monday-leap-year-edition.html" title="Merb Monday: The Leap Year Edition" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=7804365641224006792" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/7804365641224006792/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/7804365641224006792" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/7804365641224006792" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/02/merb-monday-leap-year-edition.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-1059409778585858816</id><published>2008-02-18T14:47:00.000-08:00</published><updated>2008-02-18T15:15:59.433-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><title type="text">Merb Monday: State of flux</title><content type="html">This week's edition is a little short.  Certainly not for lack of activity in #merb, but due to the continued disturbance in the force caused by the 0.9 transition.&lt;br /&gt;&lt;br /&gt;0.5 to 0.9 is a big jump (no wonder they skipped 0.6, 0.7 and 0.8!)  Most of the discussion this week continued to be related to the transition to 0.9 and trouble ticket type "stuff".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;News&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://gweezlebur.com/2008/2/14/merb-0-9-0-released-kinda"&gt;0.9 was released (kinda)&lt;/a&gt;, however this is a "developer" release and still has some wrinkles to be ironed out before a general public release will be pushed to RubyForge.  If you are anxious to give it a spin, check &lt;a href="http://merbivore.com/get_merb.html#stable"&gt;Merbivore&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It looks like there will likely be a 0.9.1 "developer" release in the near future.  Once we get to a 0.9.x general public release things should settle down and this series should get back to normal.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://rubyforge.org/projects/merbful-auth/"&gt;merbful_authentication&lt;/a&gt; should soon be updated to be compatible with 0.9.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Required Reading&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;0.9 introduces some really cool changes.  One of those is Rack integration.  You should read Ezra's post "&lt;a href="http://brainspl.at/articles/2008/02/16/so-merb-core-is-built-on-rack-you-say-why-should-i-care"&gt;So merb-core is built on rack you say? Why should I care?&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; If I use ActiveRecord as the ORM, do I then use ActiveRecord's migrations (and its syntax) by default?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; Yes.  You can use ActiveRecord with Merb as you would with Rails.  (&lt;span style="font-style: italic;"&gt;Answer by amoeba&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; How do you generate an app in Merb 0.9?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; ./script/generate is gone.  In it's place now lives merb-gen.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;merb-gen myapp # a normal merb app&lt;br /&gt;&lt;br /&gt;merb-gen myapp --flat # a flattened app&lt;br /&gt;&lt;br /&gt;merb-gen myapp --very-flat # a single-file app&lt;/code&gt;&lt;/blockquote&gt;(&lt;span style="font-style: italic;"&gt;Answer by ivey&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Answer Of The Week&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;And the answer to many of the questions this week which followed the format of:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; _____________________ in Merb 0.9?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; "It's not in -core anymore" (&lt;span style="font-style: italic;"&gt;Answer by ivey&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Audience Participation&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; Assuming you are using ActiveRecord with Merb, how can you share models with a Rails application?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you leave your answer in the comments, I'll post it next week.  (&lt;a href="http://railspikes.com/2007/4/1/merb"&gt;hint&lt;/a&gt;) (&lt;span style="font-style: italic;"&gt;Question &amp;amp; link by seebg&lt;/span&gt;)&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=h1pkf3E"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=h1pkf3E" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=QlokhMe"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=QlokhMe" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=O91jHDe"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=O91jHDe" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=X3rYW2e"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=X3rYW2e" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/237236446/merb-monday-state-of-flux.html" title="Merb Monday: State of flux" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=1059409778585858816" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/1059409778585858816/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/1059409778585858816" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/1059409778585858816" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/02/merb-monday-state-of-flux.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-4471911985405373941</id><published>2008-02-11T06:37:00.000-08:00</published><updated>2008-02-11T11:38:56.433-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><title type="text">Merb Monday: "That's the spirit"</title><content type="html">Tidbits from #merb for the week of Feb 4 - Feb 10.&lt;br /&gt;&lt;br /&gt;A lot of the conversation this week revolved around the pre 0.9 release.  Many of the questions involved bugs or other issues that one can expect in a pre-release.  In general I didn't include them as they will quickly be outdated and likely be of little on going value.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; How do I install (freeze) gems within my application?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; Navigate to the root of your Merb application.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;gem install foo -i gems&lt;/code&gt;&lt;/blockquote&gt;In your merb.yml file include a line:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;dependency "foo"&lt;/code&gt;&lt;/blockquote&gt;(&lt;span style="font-style: italic;"&gt;Answer by wycats&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q: &lt;/span&gt;How do I support a new MIME type?  Say for an Atom feed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; &lt;blockquote&gt;&lt;code&gt;Merb.add_mime_type(:atom,:to_atom,%w[application/x-atom])&lt;/code&gt;&lt;/blockquote&gt;Replace application/x-atom with whatever the correct header for atom is then make a template: foo.atom.erb&lt;br /&gt;&lt;br /&gt;In your controller, use:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;provides :atom&lt;/code&gt;&lt;/blockquote&gt;(&lt;span style="font-style: italic;"&gt;Answer by ezmobius&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; Where could I define a constant which would then be accessible in different views, but should have a different value depending on the environment merb is running in?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; config/environment/*.rb where * represents the desired environment, for example development.rb.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; How do I find the current controller and action in the view?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;/span&gt;In a helper you could create the two following methods.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;def controller_name&lt;br /&gt;controller.request.controller_name.split('_').first&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;def action_name&lt;br /&gt;controller.request.action&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;(&lt;span style="font-style: italic;"&gt;Answer by slurry&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; What happened to MERB_ENV?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;A:&lt;/span&gt; Merb's application constants have been re-factored as follows:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;Old  constant        : New method&lt;br /&gt;&lt;br /&gt;MERB_FRAMEWORK_ROOT  :  Merb.framework_root&lt;br /&gt;MERB_ROOT                                          :  Merb.root&lt;br /&gt;MERB_VIEW_ROOT                      :  Merb.view_path&lt;br /&gt;MERB_SKELETON_DIR     :  Merb.skeleton_path&lt;br /&gt;MERB_LOGGER                                 :  Merb.logger&lt;br /&gt;MERB_PATHS                                      :  Merb.load_paths&lt;br /&gt;MERB_ENV                                              :  Merb.environment&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;(&lt;span style="font-style: italic;"&gt;Answer by slurry&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; Is there a way to list all the generators available?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;/span&gt;ruby ./script/generate&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; Where is the source now?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; The Merb project has switched from using SVN to Git for source code management.  With that change the source is now at &lt;a href="http://www.github.com/"&gt;Github&lt;/a&gt;.  Specifically you will want to use wycats repo, which you can find at:  git://github.com/wycats/&lt;br /&gt;&lt;br /&gt;The source code is broken down into merb-core, merb-more, and merb-plugins.&lt;br /&gt;&lt;br /&gt;For more information on how to work with Git, see "&lt;a href="http://gweezlebur.com/2008/2/1/so-you-want-to-contribute-to-merb-core-part-1"&gt;So you want to contribute to Merb-core&lt;/a&gt;".&lt;br /&gt;&lt;br /&gt;Once you have cloned the Git repos to your local system, you will then move into that directory and issue a "rake install" command to build the gem.&lt;br /&gt;(&lt;span style="font-style: italic;"&gt;Answer by ivey&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; Where are bugs / tickets being tracked now?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; Along with the move to Github, bugs and ticket tracking has been moved from DevJaVu over to Lighthouse, specifically at &lt;a href="http://merb.lighthouseapp.com/"&gt;merb.lighthouseapp.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Answer of the week&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is one little snippet of conversation that may provide the answer regardless of your specific problem:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; Can I do _____________?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;u&gt;hassox&lt;/u&gt;: I guess so&lt;br /&gt;&lt;u&gt;hassox&lt;/u&gt;: but I can't really help you on it...&lt;br /&gt;&lt;u&gt;grrt&lt;/u&gt;: :) I'll see how far I get&lt;br /&gt;&lt;u&gt;hassox&lt;/u&gt;: that's the spirit :)&lt;br /&gt;&lt;u&gt;grrt&lt;/u&gt;: it's great to just explore&lt;br /&gt;&lt;br /&gt;Sometimes it's best to just try something out.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Audience Participation&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Q:&lt;/span&gt; Merb-core has methods "render" and "display".  What's the difference?  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Leave your answer in the comments.  (&lt;a href="http://github.com/wycats/merb-core/tree/master/docs/new_render_api"&gt;Hint&lt;/a&gt;)&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=pJ3tqbE"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=pJ3tqbE" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=61JX4Xe"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=61JX4Xe" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=TkSuVEe"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=TkSuVEe" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=Wnayixe"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=Wnayixe" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/233190076/merb-monday-thats-spirit.html" title="Merb Monday: &quot;That's the spirit&quot;" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=4471911985405373941" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/4471911985405373941/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/4471911985405373941" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/4471911985405373941" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/02/merb-monday-thats-spirit.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-7470260885734899344</id><published>2008-02-04T11:00:00.000-08:00</published><updated>2008-02-04T09:52:18.069-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web worker" /><title type="text">Working Remotely: The "Get Real" List.</title><content type="html">Every once in a while a post shows up on Digg or elsewhere about how to work remotely.  Often it will be phrased like "How to work from the beach".&lt;br /&gt;&lt;br /&gt;After reading these lists, I can't help put wonder... "do any of these people have any idea what they are talking about?"&lt;br /&gt;&lt;br /&gt;Most of these articles are nothing more than recommendations for various online applications from flickr to mozy to zoho - which in my opinion have nothing to do with your ability to work remotely or not.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;My Credentials&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;I lived in Cerro Punta, Chiriqui, Panama for 14 months.  That's up in the mountains... in Central America... where most people don't have telephone service... or refrigerators.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;How To Really Work Remotely&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;(from the beach or wherever you want)&lt;br /&gt;The ability to do this has nothing to do with online applications.  Here are the seven requirements that I needed:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1) Laptop&lt;/span&gt;&lt;br /&gt;A laptop is the tool of choice for a number of reasons.  It is easy to transport to your destination.  If the power goes out, you still can work (and hopefully it will come back on before your battery dies).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2) Battery Back-Up / UPS / Surge Protector&lt;/span&gt;&lt;br /&gt;With a laptop, the battery back-up portion may not be as critical - but you definitely will want to have all of your hardware plugged in to quality surge protector.  Surges happen.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3) Data Back-Up&lt;/span&gt;&lt;br /&gt;Your business likely depends upon your data.  Get an external drive and make sure you are regularly backing up your data.  As a second step, an internet based back-up can't hurt.  But with a slower Internet connection (or even a fast one) this may be a slow way to recover your data in case of a catastrophe, and thus I wouldn't recommend it as your only back up.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4) Internet&lt;/span&gt;&lt;br /&gt;The Internet itself, not the online applications, is your connection to the outside world.  Depending on your specific usage, the speed and reliability required will vary.  You may also wish to secure two means of connection, as the reliability may be less than you are used to.  I was able to secure a cellular based service (advertised at 256K, but more like 56-128k down/15k up), and also a wireless service (1MB up/down).  The cell service was slow, but cool that it basically worked country-wide (yes, even at the beach).  Between the two I was able to have very reliable service and even good enough quality for VoIP phone calls.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5) Phone number&lt;/span&gt;&lt;br /&gt;You (likely) need a phone number that can follow you wherever you happen to be.  I used Packet8's VoIP service for my business line.  This meant I could simply plug my little VoIP box into my router in Panama, and all my incoming / outgoing calls went through my TX number.  Skype also worked pretty well.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6) A local relative / friend&lt;/span&gt;&lt;br /&gt;Mail still needed to be picked up from my PO Box.  Checks still needed to be deposited in my Bank account.  Having a trustworthy person that you are able to turn these simple, but important, tasks over to will be a huge help.  There are mail processing services available, but not in every city (or even state).  Having clients send mail to an address in a different state might make them uncomfortable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;7) A business / job that does not require your physical presence&lt;/span&gt;&lt;br /&gt;In the end this is the one that didn't work out.  My line of work lends itself to remote work extremely well.  Even when I am local, in person contact is very limited during the course of a project.  The problem that arose was the initial phase of acquiring new projects.  I would get leads, perform the initial interviews &amp;amp; evaluations, compile a proposal and even get the proposal accepted.  But then many clients would want to meet face to face to sign the contract.  Obviously this won't be true for every business, or geographical location, but for my principally Texas based clients this became a sticking point.&lt;br /&gt;&lt;br /&gt;So that's what worked for me.  For 14 months.  In a cloud forest in Central America.  And amazingly I didn't need any online applications to do it!&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=mf9ZOWE"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=mf9ZOWE" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=pYx0pHe"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=pYx0pHe" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=9mI5eae"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=9mI5eae" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=L5hFyge"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=L5hFyge" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/229029281/working-remotely-get-real-list.html" title="Working Remotely: The &quot;Get Real&quot; List." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=7470260885734899344" title="5 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/7470260885734899344/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/7470260885734899344" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/7470260885734899344" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/02/working-remotely-get-real-list.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-1050600569932261377</id><published>2008-02-04T09:00:00.000-08:00</published><updated>2008-02-04T07:27:36.526-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><title type="text">Merb Monday: Environment variables, partials, etc.</title><content type="html">I see a lot questions asked and answered in the #merb IRC room.&lt;br /&gt;&lt;br /&gt;Many of them are questions that later I wish I remembered the answer to!  So I'm going to try to keep track of questions I see asked and answered and record them here for the benefit of myself and others, and hopefully publish them here every Monday.&lt;br /&gt;&lt;br /&gt;I might re-phrase the questions and answers slightly, as the writing tends to be quite terse on IRC.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;span style="font-size:100%;"&gt;How do you check the current environment in Merb? I'm looking for the Merb equivalent to RAILS_ENV.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; Merb.environment &lt;span style="font-style: italic;"&gt;(Answered by: Booster)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Q: How do you render partials?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; You use the &lt;a href="http://merb.rubyforge.org/classes/Merb/RenderMixin.html#M000128"&gt;partial&lt;/a&gt; method.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Scenario 1&lt;/u&gt;: You wish to render a partial template found in the same directory as your action's view template.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;partial :foo&lt;/code&gt;&lt;/blockquote&gt;This will look in the current directory for a file named _foo.html.erb&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Scenario 2&lt;/u&gt;: You wish to render a partial template found in a different directory than the action's view template.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;partial 'common/foo'&lt;/code&gt;&lt;/blockquote&gt;This will look for the file views/common/_foo.html.erb&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(Answered by: jp_n9)&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Q: I'm trying to run my db:migrate and I'm getting a "no such file to load -- spec/rake/spectask" error.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; Make sure you have the rspec gem installed.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;sudo gem install rspec&lt;/code&gt;&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;(Answered by: octopod)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Q: How do I start merb in production mode?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; Use the -e option.  For example,&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;merb -e production&lt;/code&gt;&lt;/blockquote&gt;For a complete list of parameters type:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;merb --help&lt;/code&gt;&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;(Answered by: Phoop)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Q: How do I get Merb to log data to the log file?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; Make sure that you start Merb as a daemon with the -d directive, this will cause output to be logged to the log file located in the log/ directory (instead of being output to the console window).&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;merb -d&lt;/code&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;(Answered by: ezmobius)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Q: How can I use HAML for my templates?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt;&lt;/span&gt; Name your files with the .html.haml extension instead of the default .html.erb extension.&lt;br /&gt;&lt;br /&gt;Example: name.html.haml&lt;br /&gt;&lt;br /&gt;Second, you need to edit dependencies.rb to include the line:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;dependency "haml"&lt;/code&gt;&lt;/blockquote&gt;You will also need to have the haml gem installed on your system.  Restarting Merb will also likely be required. &lt;/span&gt;&lt;span style="font-style: italic;"&gt;(Answered by: QaDeS, bradly)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Q: Is there an easy way to get the current URL in a merb view?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;A:&lt;/span&gt; I think it's request.uri&lt;/span&gt;&lt;span style="font-style: italic;"&gt; (Answered by: hassox)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;In my  testing the request variable does not appear to be directly available from a view template.  However if you need that information you can easily pass the entire request variable, or just request.uri, into your view from the controller.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=y91eZ1E"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=y91eZ1E" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=BZ9qy1e"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=BZ9qy1e" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=Bpmsn2e"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=Bpmsn2e" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=muqZXte"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=muqZXte" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/227601259/merb-faqs-environment-variables.html" title="Merb Monday: Environment variables, partials, etc." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=1050600569932261377" title="1 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/1050600569932261377/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/1050600569932261377" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/1050600569932261377" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/02/merb-faqs-environment-variables.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-1886330569905693811</id><published>2008-01-31T10:09:00.000-08:00</published><updated>2008-01-31T11:36:50.314-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="monit" /><category scheme="http://www.blogger.com/atom/ns#" term="mongrel" /><category scheme="http://www.blogger.com/atom/ns#" term="swiftiply" /><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><title type="text">Monitoring Swiftiply &amp; Merb with Monit</title><content type="html">&lt;a href="http://swiftiply.swiftcore.org/"&gt;Swiftiply&lt;/a&gt; combined with &lt;a href="http://merbivore.com/"&gt;Merb&lt;/a&gt; is a pretty nice way to serve up your application.  And while we hope that both are stable, it would be nice to know that just in case anything went wrong they would restart.  It would also be nice for the application to automatically start upon reboot.&lt;br /&gt;&lt;br /&gt;That is what we are going to attempt to setup using &lt;a href="http://www.tildeslash.com/monit/"&gt;Monit&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Prerequisites:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;We assume you already have Swiftiply and Merb setup and functioning properly.  We are also assuming that you have Monit installed and functioning properly.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Versions:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Ubuntu 7.10 (Gutsy)&lt;/li&gt;&lt;li&gt;Ruby: 1.8.6&lt;/li&gt;&lt;li&gt;Merb: 0.5.2&lt;/li&gt;&lt;li&gt;Swiftiply: 0.6.1.1&lt;/li&gt;&lt;li&gt;Monit 4.8.1&lt;/li&gt;&lt;li&gt;Assumes your Merb app is "frozen" (rake merb:freeze)&lt;/li&gt;&lt;/ul&gt;Those are the version I was using at the time of the article.  Different versions may lead to varying results.&lt;div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Setup Monit To Auto-Start&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo vim /etc/default/monit&lt;/code&gt;&lt;/blockquote&gt;This is a pre-existing file.  Edit as follows:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;startup=1&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Create init script for Swiftiply&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;The big problem with trying to monitor Swiftiply was that it does not write a pidfile for Monit to track.  Fortunately someone solved the problem, and Google found it.  Big credit for the script: &lt;a href="http://pastie.textmate.org/107044.txt"&gt;http://pastie.textmate.org/107044.txt&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo vim /etc/init.d/swiftiply&lt;/code&gt;&lt;/blockquote&gt;This will be a new blank file.  Edit as follows:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;function generatepid(){&lt;br /&gt;  current_pid=`pgrep -f 'swiftiply -c /etc/swiftiply.conf'`&lt;br /&gt;  pidfile_pid=`cat /var/run/swiftiply.pid`&lt;br /&gt;&lt;br /&gt;  if [[ $current_pid = '' ]]; then&lt;br /&gt;    rm /var/run/swiftiply.pid&lt;br /&gt;  elif [[ $pidfile_pid != $current_pid ]]; then&lt;br /&gt;    echo $current_pid &gt; /var/run/swiftiply.pid&lt;br /&gt;  fi&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;case "$1" in&lt;br /&gt;&lt;br /&gt;  start)&lt;br /&gt;    echo -n "Starting swiftiply:"&lt;br /&gt;    swiftiply -c /etc/swiftiply.conf&lt;br /&gt;    generatepid&lt;br /&gt;    echo&lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;  stop)&lt;br /&gt;   echo -n "Stopping swiftiply:"&lt;br /&gt;   killall -9 swiftiply&lt;br /&gt;   generatepid&lt;br /&gt;   echo&lt;br /&gt;   ;;&lt;br /&gt;&lt;br /&gt;  restart)&lt;br /&gt;    $0 stop&lt;br /&gt;    $0 start&lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;  pid)&lt;br /&gt;    generatepid&lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;  *)&lt;br /&gt;  echo "usage: $0 [start|stop|restart|pid]"&lt;br /&gt;esac&lt;br /&gt;&lt;br /&gt;exit 0&lt;/code&gt;&lt;/blockquote&gt;&lt;div&gt;This does assume that you Swiftiply configuration file is location at /etc/swiftiply.conf, if not change to the correct location.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Create init Script For Your Merb App&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;I will use "app1" but you can replace that with whatever name you would like as an identifier for this specific Merb application.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo vim /etc/init.d/merb_app1&lt;/code&gt;&lt;/blockquote&gt;This will be a new blank file.  Edit as follows:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;case "$1" in&lt;br /&gt;&lt;br /&gt;  start)&lt;br /&gt;    echo -n "Starting Merb for App1:"&lt;br /&gt;    export SWIFT=1&lt;br /&gt;    export HOME="/home/admin" #Assuming you have a user admin&lt;br /&gt;    cd /full/path/to/your/app/current/&lt;br /&gt;    sudo ./script/merb -d -h 127.0.0.1 -p 30000 -e production&lt;br /&gt;    echo&lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;  stop)&lt;br /&gt;    echo -n "Stopping Merb for App1:"&lt;br /&gt;    cd /full/path/to/your/app/current/&lt;br /&gt;    sudo ./script/stop_merb&lt;br /&gt;    echo&lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;  restart)&lt;br /&gt;    $0 stop&lt;br /&gt;    $0 start&lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;  *)&lt;br /&gt;  echo "usage: $0 [start|stop|restart]"&lt;br /&gt;esac&lt;br /&gt;&lt;br /&gt;exit 0&lt;/code&gt;&lt;/blockquote&gt;The -p directive should point to the same port that you have configured Swiftiply to listen to for this specific app.  Also, this is assuming that you have Merb frozen.  If not, then you will need to change "./script/merb" and "./script/stop_merb" to their unfrozen counterparts.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Set Permissions&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Without these permissions set to execute the init scripts will not work.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo chmod 755 /etc/init.d/swiftiply&lt;br /&gt;&gt; sudo chmod 755 /etc/init.d/merb_app1&lt;/code&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Configure Your Main Monit File&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo vim /etc/monit/monitrc&lt;/code&gt;&lt;/blockquote&gt;Add the following in to the pre-existing configuration:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;  check process swiftiply with pidfile /var/run/swiftiply.pid&lt;br /&gt;  group root&lt;br /&gt;  start program = "/etc/init.d/swiftiply start"&lt;br /&gt;  stop program = "/etc/init.d/swiftiply stop"&lt;br /&gt;  if 5 restarts within 5 cycles then timeout&lt;br /&gt;&lt;br /&gt;include /etc/monit/app1&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Configure App1 Monit File&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;You could have just added the following in the main file, but I prefer to use the include statement and keep them in separate files.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo vim /etc/monit/app1&lt;/code&gt;&lt;/blockquote&gt;This will be a new blank file. Edit as follows:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt; check process merb_app1  &lt;br /&gt;  with pidfile /full/path/to/your/app/current/log/merb.30000.pid  &lt;br /&gt;  start program = "/etc/init.d/merb_app1 start"&lt;br /&gt;  stop program = "/etc/init.d/merb_app1 stop"&lt;br /&gt;  if 5 restarts within 5 cycles then timeout&lt;br /&gt;depends on swiftiply&lt;/code&gt;&lt;/blockquote&gt;30000 should be replaced with the specific port that you have Swiftiply listening on for this application.  The "depends on swiftiply" will make sure that swiftiply is started first.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Does it work?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;It'd take a miracle...&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo monit -t&lt;br /&gt;&gt; sudo /etc/init.d/monit force-reload&lt;br /&gt;&gt; sudo monit validate&lt;br /&gt;&gt; sudo monit summary&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Caveats&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;This setup only checks to make sure the processes are up and running.&lt;/div&gt;&lt;div&gt;Right now Merb overwrites log/merb.port#.&lt;port&gt;pid with the last mongrel process started.  &lt;/port&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;port&gt;Unfortunately that means if you start 5 mongrels, you will only have the pid of the last one, and thus will only be able to monitor that one process with Monit.&lt;/port&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On the up side, it still means you can guarantee at least one process to be up and responding to requests - which is better than none.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Update&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Merb 0.9 is supposed to add the ability to specify a pidfile which will allow us to monitor multiple Merb processes even on the same port.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Useful?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;If so, why not &lt;a href="http://www.workingwithrails.com/recommendation/new/person/6666-justin-pease"&gt;recommend me on Working With Rails&lt;/a&gt;!&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=k29I78D"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=k29I78D" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=gSJbI8d"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=gSJbI8d" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=ufVXPld"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=ufVXPld" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=tdTMrrd"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=tdTMrrd" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/226714034/monitoring-swiftiply-merb-with-monit.html" title="Monitoring Swiftiply &amp; Merb with Monit" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=1886330569905693811" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/1886330569905693811/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/1886330569905693811" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/1886330569905693811" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/01/monitoring-swiftiply-merb-with-monit.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-7725331372171664127</id><published>2008-01-30T08:15:00.000-08:00</published><updated>2008-01-30T08:23:40.764-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="book review" /><category scheme="http://www.blogger.com/atom/ns#" term="erlang" /><title type="text">Book Review: Programming Erlang</title><content type="html">&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_pGfdZQGFgvE/R6CjM3OC3VI/AAAAAAAAAEY/dOWfL6ABYV4/s320/eralng.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5161304614343204178" /&gt;&lt;div&gt;Author: Joe Armstrong&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;Erlang really appears to be an interesting language, and the author's enthusiasm for the subject shows - which is good. It helped me to keep going, when at times the code was a little hard to follow. &lt;br /&gt;&lt;br /&gt;The book does a good job of introducing the language. In particular later chapters give emphasis to the topics of concurrency through multiple processes, multi-cores and distributed programs. All very timely subjects for a world that is connected to the Internet, and where even laptops have multi-core processors &lt;br /&gt;&lt;br /&gt;Unfortunately, I feel the author somewhat forgot his audience. &lt;br /&gt;&lt;br /&gt;On page 5 he starts out with a description that fit me almost perfectly, and probably many other readers: "Once upon a time a programmer came across a book describing a funny programming language. It had an unfamiliar syntax [...] it wasn't even object-oriented. The programs were, well, different....Not only were the programs different, but the whole approach to programming was different." &lt;br /&gt;&lt;br /&gt;After reading the book I don't feel like the "Erlang Master" that the road map described (pg 9). While the syntax is now familiar, I still look at the Erlang code and it feels foreign. I still have to "decipher" the code instead of read it. &lt;br /&gt;&lt;br /&gt;I would have liked the book to more fully address the items from the "Once upon a time" paragraphs. Being that "the whole approach to programming" is different than the OO that many readers are used to, I would have liked to have seen a chapter (or three) on how to best get into that mode of thinking. &lt;br /&gt;&lt;br /&gt;I do think the book is a good jumping off point. It gives you more than enough to get started. &lt;br /&gt;&lt;br /&gt;However, if you are unfamiliar with languages where functions accept functions which also accept functions as parameters and in turn returns another function as a result, you may end up feeling (as I did) that you only have half the puzzle.&lt;/div&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=zGvvfTD"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=zGvvfTD" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=4JVTQOd"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=4JVTQOd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=m69k1Jd"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=m69k1Jd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=Fvqkood"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=Fvqkood" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/225989594/book-review-programming-erlang.html" title="Book Review: Programming Erlang" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=7725331372171664127" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/7725331372171664127/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/7725331372171664127" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/7725331372171664127" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/01/book-review-programming-erlang.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-2215653771648873339</id><published>2008-01-27T11:35:00.000-08:00</published><updated>2008-01-28T16:40:20.078-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="server" /><category scheme="http://www.blogger.com/atom/ns#" term="nginx" /><category scheme="http://www.blogger.com/atom/ns#" term="how-to" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="slicehost" /><title type="text">Serving PHP5 with Nginx on Ubuntu 7.10 (Gutsy)</title><content type="html">There are lots of tutorials out there to setup &lt;a href="http://www.php.net/"&gt;PHP &lt;/a&gt;with &lt;a href="http://www.nginx.net/"&gt;Nginx&lt;/a&gt;.  I'm probably just retarded, but none of them got me to a working system.  A detail left out of one, a configuration file left out of another, etc.&lt;br /&gt;&lt;br /&gt;What follows is exactly what I did to get Nginx to serve PHP5 on a fresh Slicehost VPS slice running Ubuntu 7.10.  Hopefully it will help someone else.&lt;br /&gt;&lt;br /&gt;NOTE: The following commands assume that you have already setup a user account with sudo privileges and are executing the commands as that user, NOT as root.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Update your system and install basic tools required&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo aptitude update -y&lt;br /&gt;&gt; sudo  locale-gen en_GB.UTF-8&lt;br /&gt;&gt; sudo  /usr/sbin/update-locale LANG=en_GB.UTF-8&lt;br /&gt;&gt; sudo  aptitude safe-upgrade -y&lt;br /&gt;&gt; sudo  aptitude full-upgrade -y&lt;br /&gt;&gt; sudo aptitude install build-essential -y&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Install MySQL&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo aptitude install mysql-server mysql-client libmysqlclient15-dev -y&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Install PHP5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo aptitude install php5-cli php5-cgi php5-mysql php5-xcache -y&lt;/code&gt;&lt;/blockquote&gt;Note: Xcache is installed at this point and available for you to setup, but by default is not turned on.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Install Nginx&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo aptitude install nginx -y&lt;/code&gt;&lt;/blockquote&gt;Go to your IP address and you should now recieve the message "Welcome to nginx!"&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;FastCGI Parameter Configuration&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We will place all of our fastcgi parameters in a single file which we can include in as necessary.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo vim /etc/nginx/fastcgi_params&lt;/code&gt;&lt;/blockquote&gt;This will be a new empty file, add the following and save:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;fastcgi_param  QUERY_STRING       $query_string;&lt;br /&gt;fastcgi_param  REQUEST_METHOD     $request_method;&lt;br /&gt;fastcgi_param  CONTENT_TYPE       $content_type;&lt;br /&gt;fastcgi_param  CONTENT_LENGTH     $content_length;&lt;br /&gt;&lt;br /&gt;fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;&lt;br /&gt;fastcgi_param  REQUEST_URI        $request_uri;&lt;br /&gt;fastcgi_param  DOCUMENT_URI       $document_uri;&lt;br /&gt;fastcgi_param  DOCUMENT_ROOT      $document_root;&lt;br /&gt;fastcgi_param  SERVER_PROTOCOL    $server_protocol;&lt;br /&gt;&lt;br /&gt;fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;&lt;br /&gt;fastcgi_param  SERVER_SOFTWARE    nginx;&lt;br /&gt;&lt;br /&gt;fastcgi_param  REMOTE_ADDR        $remote_addr;&lt;br /&gt;fastcgi_param  REMOTE_PORT        $remote_port;&lt;br /&gt;fastcgi_param  SERVER_ADDR        $server_addr;&lt;br /&gt;fastcgi_param  SERVER_PORT        $server_port;&lt;br /&gt;fastcgi_param  SERVER_NAME        $server_name;&lt;br /&gt;&lt;br /&gt;# PHP only, required if PHP was built with --enable-force-cgi-redirect&lt;br /&gt;# fastcgi_param  REDIRECT_STATUS    200;&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Nginx Configuration&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo vim /etc/nginx/sites-available/default&lt;/code&gt;&lt;/blockquote&gt;This is a pre-existing file.  Find the part that looks similar to the following and edit it as so and save:&lt;blockquote&gt;&lt;code&gt;location ~ \.php$ {&lt;br /&gt;  fastcgi_pass   127.0.0.1:9000;&lt;br /&gt;  fastcgi_index  index.php;&lt;br /&gt;  &lt;nobr&gt;fastcgi_param  SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;&lt;/nobr&gt;&lt;br /&gt;  include /etc/nginx/fastcgi_params;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;We need to remember to restart Nginx so that it picks up our configuration changes.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo /etc/init.d/nginx stop&lt;br /&gt;&gt; sudo /etc/init.d/nginx start&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Spawn-fcgi&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We still need a script to start our fast cgi processes.  We will extract one from Lighttpd.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; mkdir ~/sources&lt;br /&gt;&gt; cd ~/sources&lt;br /&gt;&gt; wget http://www.lighttpd.net/download/lighttpd-1.4.18.tar.bz2&lt;br /&gt;&gt; tar -xvjf lighttpd-1.4.18.tar.bz2 &lt;br /&gt;&gt; cd lighttpd-1.4.18&lt;br /&gt;&gt; ./configure&lt;br /&gt;&gt; make&lt;br /&gt;&gt; sudo cp src/spawn-fcgi /usr/bin/spawn-fcgi&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Let's get automated!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo touch /usr/bin/php-fastcgi&lt;br /&gt;&gt; sudo vim /usr/bin/php-fastcgi&lt;/code&gt;&lt;/blockquote&gt;This is a new empty file, add the following and save:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;#!/bin/sh&lt;br /&gt;/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -f /usr/bin/php5-cgi&lt;/code&gt;&lt;/blockquote&gt;Next...&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo touch /etc/init.d/init-fastcgi&lt;br /&gt;&gt; sudo vim /etc/init.d/init-fastcgi&lt;/code&gt;&lt;/blockquote&gt;This is also a new empty file, add the following and save:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;#!/bin/bash&lt;br /&gt;PHP_SCRIPT=/usr/bin/php-fastcgi&lt;br /&gt;RETVAL=0&lt;br /&gt;case "$1" in&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;start)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;$PHP_SCRIPT&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;RETVAL=$?&lt;br /&gt;;;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;stop)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;killall -9 php&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;RETVAL=$?&lt;br /&gt;;;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;restart)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;killall -9 php&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;$PHP_SCRIPT&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;RETVAL=$?&lt;br /&gt;;;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;*)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;echo "Usage: php-fastcgi {start|stop|restart}"&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;exit 1&lt;br /&gt;;;&lt;br /&gt;esac&lt;br /&gt;exit $RETVAL&lt;/code&gt;&lt;/blockquote&gt;We need to change some permissions to make this all work.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo chmod 755 /usr/bin/php-fastcgi&lt;br /&gt;&gt; sudo chmod 755 /etc/init.d/init-fastcgi&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Create a Test File&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo vim /var/www/nginx-default/index.php&lt;/code&gt;&lt;/blockquote&gt;Let's just print out the information page for our PHP installation.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;?php echo phpinfo(); ?&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Start It Up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&gt; /etc/init.d/init-fastcgi start&lt;/code&gt;&lt;/blockquote&gt;&lt;div&gt;Now go to your IP address/index.php and you should see the PHP info page displayed.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Set To Startup Automatically Upon Reboot&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo update-rc.d init-fastcgi defaults&lt;/code&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;You might want to test and make sure that it actually starts up upon reboot...&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;code&gt;&gt; sudo reboot&lt;/code&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Final Words&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;If you think I have done anything stupid in the way this is setup, you may very well be right!  Please leave a comment with a suggestion on how to improve the setup.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You probably will want to look into configuring Nginx for VirtualHosts, which is not considered in this post.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Credits&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Much of this information was taken from the excellent post: &lt;a href="http://www.howtoforge.com/lemp_nginx_mysql_php_ubuntu_debian"&gt;How To Install A Complete LEMP (Linux - EnginxX (Nginx HTTP SERVER) - Mysql - PHP) Server (Not LAMP...) On Ubuntu/Debian&lt;/a&gt;, which got me about 90% there.&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=FXLMoAD"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=FXLMoAD" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=cITK9Ud"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=cITK9Ud" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=3HEfIEd"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=3HEfIEd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=pfmYwmd"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=pfmYwmd" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/224159707/serving-php5-with-nginx-on-ubuntu-710.html" title="Serving PHP5 with Nginx on Ubuntu 7.10 (Gutsy)" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=2215653771648873339" title="14 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/2215653771648873339/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/2215653771648873339" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/2215653771648873339" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/01/serving-php5-with-nginx-on-ubuntu-710.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-6449767459235924911</id><published>2008-01-18T12:01:00.000-08:00</published><updated>2008-01-18T14:35:56.584-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=":bundle" /><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">Merb: Multiple CSS files, one server request.</title><content type="html">In my previous post &lt;a href="http://jit.nuance9.com/2007/11/continued-education-performance-yahoo.html"&gt;Continued Education: Performance Yahoo&lt;/a&gt; I referred to Steve Souder' book "High Performance Web Sites".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Rule #1 is "Make fewer HTTP requests."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we already know that &lt;a href="http://merbivore.com/"&gt;Merb&lt;/a&gt; is "built for speed", but generally that is considered within the context of the server side of things.&lt;br /&gt;&lt;br /&gt;I was happy to see that Merb also allows us to follow Souder's #1 Rule for making the client side snappy too.  So how does Merb allow us to make fewer HTTP requests?  By dynamically combining multiple stylesheet or script files into one.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Let's see some code!&lt;/span&gt;&lt;br /&gt;It's this simple:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;br /&gt;# app/views/layout/application.html.erb&lt;br /&gt;&lt;% require_css :reset %&gt;&lt;br /&gt;&lt;% require_css :master %&gt;&lt;br /&gt;&lt;%= include_required_css :bundle =&gt; true %&gt;&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;We define the various CSS files we wish to be included using require_css (in this example reset.css and master.css), then by setting the :bundle =&gt; true paramenter everything will be served up in a single HTTP request in a file called  all.css!  Now that's pretty cool.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;But wait there's more!&lt;/span&gt;&lt;br /&gt;The same technique works for Javascripts too.&lt;br /&gt;You can have the same functionality for your javascripts using this syntax:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;% require_js :foo $&gt;&lt;br /&gt;&lt;%= include_required_js :bundle =&gt; true %&gt;&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;But wait there's even more!&lt;/span&gt;&lt;br /&gt;Now what is really cool is that you don't have to place your require_css or require_js statements only in the layout.  You can place those in your views or even partials.  &lt;strike&gt;That means that for any given request, the bundled file will only include the files that are needed for that specific view.&lt;/strike&gt; Edit: It looks like you may need to manually define and uniquely name each possible combination of files.  It also appears that a CSS file required in a view will appear first in the generated combined CSS file and thus be over ridden by the (likely) more general file defined in the layout - which probably isn't the desired behavior.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Getting it to work&lt;/span&gt;&lt;br /&gt;By default the bundling action should only occur when in production mode.  At the moment (Merb 0.5.2) it appears there is a bug and the bundling action doesn't realize when it is in production mode - so nothing happens.&lt;br /&gt;&lt;br /&gt;What you need to do is edit your config/merb.yml file and uncomment the line that reads:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;:bundle_assets: true&lt;/code&gt;&lt;/blockquote&gt;That's it!  Should work.  Enjoy.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;One Gottcha&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;By forcing :bundle_assets to true in the merb.yml file, we are enabling this functionality for all environments instead of just for production.  This isn't really ideal&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Credits&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Thanks to dudleyf in #merb for helping me figure this out.  Thanks to &lt;a href="http://blog.codahale.com/"&gt;codahale&lt;/a&gt; for writing the code for :bundle.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=xD5OlsD"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=xD5OlsD" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=3Bmp2Ad"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=3Bmp2Ad" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=KrdWpNd"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=KrdWpNd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=P5cDNbd"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=P5cDNbd" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/219058177/merb-multiple-css-file-one-server.html" title="Merb: Multiple CSS files, one server request." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=6449767459235924911" title="1 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/6449767459235924911/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/6449767459235924911" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/6449767459235924911" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2008/01/merb-multiple-css-file-one-server.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-6036740091863773186</id><published>2008-01-18T10:08:00.000-08:00</published><updated>2008-01-18T12:35:01.458-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="continued education" /><category scheme="http://www.blogger.com/atom/ns#" term="yahoo" /><category scheme="http://www.blogger.com/atom/ns#" term="web performance" /><title type="text">Continued Education: Performance Yahoo</title><content type="html">In this edition of "Continued Education" I'm linking up Steve Souders' (Chief Performance Yahoo!) Google Talk "&lt;a href="http://video.google.com/videoplay?docid=374343798097710096&amp;amp;q=user%3A%22Google+engEDU%22&amp;amp;total=584&amp;amp;start=0&amp;amp;num=10&amp;amp;so=1&amp;amp;type=search&amp;amp;plindex=0"&gt;High Performance Web Sites: 14 rules for faster pages&lt;/a&gt;".&lt;br /&gt;&lt;br /&gt;I've recently been reading  his book that covers the same topic, but sometimes it's nice to be able to just veg-out and watch.&lt;br /&gt;&lt;br /&gt;Good practical information that is fairly easy to implement and can greatly improve our users' experiences.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=5YqgkOD"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=5YqgkOD" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=DkDUH2d"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=DkDUH2d" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=EtAlMpd"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=EtAlMpd" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=LOtIo2d"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=LOtIo2d" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/219049676/continued-education-performance-yahoo.html" title="Continued Education: Performance Yahoo" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=6036740091863773186" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/6036740091863773186/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/6036740091863773186" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/6036740091863773186" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2007/11/continued-education-performance-yahoo.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-6280400553560132085</id><published>2007-12-14T07:35:00.000-08:00</published><updated>2007-12-14T09:00:37.291-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="scm" /><category scheme="http://www.blogger.com/atom/ns#" term="linus torvalds" /><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="svn" /><title type="text">To Git, or not to Git.</title><content type="html">I just read Joe Moore's (Pivotal Labs) &lt;a href="http://pivots.pivotallabs.com/users/joe/blog/articles/160-thoughts-on-linus-torvalds-s-git-talk"&gt;thoughts on the Linus Torvalds' Git talk&lt;/a&gt; that was presented at Google.&lt;br /&gt;&lt;br /&gt;I had also watched &lt;a href="http://www.youtube.com/watch?v=4XpnKHJAok8"&gt;Linus' Google Talk video&lt;/a&gt; about a month ago, and had been hearing about &lt;a href="http://git.or.cz/"&gt;Git&lt;/a&gt; in the &lt;a href="http://www.merbivore.com/"&gt;Merb&lt;/a&gt; IRC room. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Git: A cruel piece of software?&lt;/span&gt;&lt;br /&gt;The chairman introducing Linus describes Git as "a revision control system which is expressly designed to make you feel less intelligent than you thought you were" and as "a software tool which only he [Linus] is smart enough to know how to use."  Was he joking or partly serious?  I wasn't entirely sure.&lt;br /&gt;&lt;br /&gt;With that preface, I had the impression that using Git was going to have a cliff like learning curve.  Nevertheless,  I decided to give it a try so I could at least know what others were talking about.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;A collaboration of 1&lt;/span&gt;&lt;br /&gt;Unlike Pivotal Labs, I'm just a solitary developer using &lt;a href="http://en.wikipedia.org/wiki/Source_Code_Management"&gt;SCM&lt;/a&gt; to track changes on my own code.  So my needs are fairly limited.  I don't really have any "collaboration" needs.&lt;br /&gt;&lt;br /&gt;For someone with my limited SCM needs, probably any SCM would work just fine.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Initial thoughts&lt;/span&gt;&lt;br /&gt;After using Git a bit, here are a my basic thoughts.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It's actually not too difficult at all (at least at a basic user level).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It is a command line tool.  That's fine for me, as I always have a terminal open anyways.&lt;/li&gt;&lt;li&gt;Basic commands are easy to remember: "git status", "git add", "git commit", "git push"&lt;/li&gt;&lt;li&gt;It's pretty easy to setup custom ignore files and setup a remote repo.&lt;/li&gt;&lt;li&gt;Committing locally is fast &amp;amp; independent of your internet connection.&lt;/li&gt;&lt;li&gt;Deployment via Capistrano (v2.1) supports Git.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;It appears that branching and merging are very easy, but honestly I don't really do too much (ok, any) of either.  I will experiment with that in the future to see if it adds any value to my specific work flow.&lt;br /&gt;&lt;br /&gt;You won't find the same level of application support for Git as SVN at the moment.  For example, the other day I &lt;a href="http://ciaranwal.sh/2007/11/29/svnmate-update"&gt;read about the release of SVNmate&lt;/a&gt;, a bundle for Textmate which adds some SVN status icons to your files.  There currently is not a bundle offering the same for Git (although there is a bundle "work in progress").  Not necessarily deal-breakers, but things to be aware of.&lt;br /&gt;&lt;br /&gt;Personally, I'm going to continue using Git and become more familiar with it's capabilities. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOTE:&lt;/span&gt; Git does have the gitk command which opens a GUI.  I haven't used it, other than a cursory glance, and thus am not familiar with it's features.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Related Resources:&lt;/span&gt;&lt;br /&gt;Git Cheat Sheet: &lt;a href="http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html"&gt;http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html&lt;/a&gt;&lt;br /&gt;Git Tutorial: &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/tutorial.html"&gt;http://www.kernel.org/pub/software/scm/git/docs/tutorial.html&lt;/a&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=hPN9bDC"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=hPN9bDC" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=uVDXEjc"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=uVDXEjc" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=s8q1Ehc"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=s8q1Ehc" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=pHbi2Vc"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=pHbi2Vc" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/200379417/to-git-or-not-to-git.html" title="To Git, or not to Git." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=6280400553560132085" title="4 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/6280400553560132085/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/6280400553560132085" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/6280400553560132085" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2007/12/to-git-or-not-to-git.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-5370203534602407814</id><published>2007-12-10T07:14:00.000-08:00</published><updated>2007-12-10T07:24:15.289-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="logging" /><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><title type="text">Merb Tidbit: Logging</title><content type="html">Merb has it's handy built in Mongrel server, so you can easily start it up while developing with:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;merb&lt;/code&gt;&lt;/pre&gt;However, you may wonder "Why isn't it generating any log files?"&lt;br /&gt;&lt;br /&gt;Well actually it is, but the deal is they are all being output to the command line instead of being written to a file in the log/ directory.  If you want to have them written to a log file, you need to start Merb up as a daemon.  This is simply done like so:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;merb -d&lt;/code&gt;&lt;/pre&gt;Now your logs will be written to the log/ directory.  To stop the background merb process, use the -k PORT flag.  For example, if you are running on port 4000 (which is the default) you would use:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;merb -k 4000&lt;/code&gt;&lt;/pre&gt;You can also control the level of detail to be logged using the -l flag.  Optional logging levels which can be passed with the -l flag include:  DEBUG, INFO, WARN, ERROR and FATAL.&lt;br /&gt;&lt;br /&gt;That's today's Merb tidbit.  Happy Merbing!&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=adaUweC"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=adaUweC" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=hz2OKIc"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=hz2OKIc" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=IieTqtc"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=IieTqtc" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=tAwVL0c"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=tAwVL0c" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/198097528/merb-tidbit-logging.html" title="Merb Tidbit: Logging" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=5370203534602407814" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/5370203534602407814/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/5370203534602407814" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/5370203534602407814" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2007/12/merb-tidbit-logging.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-1190218230033699883</id><published>2007-11-21T13:52:00.000-08:00</published><updated>2007-11-21T13:56:29.043-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="paul rand" /><category scheme="http://www.blogger.com/atom/ns#" term="quote" /><category scheme="http://www.blogger.com/atom/ns#" term="design" /><category scheme="http://www.blogger.com/atom/ns#" term="inspiration" /><title type="text">Great Quote: Paul Rand</title><content type="html">I heard this quote in a video the other day.  It struck a chord with me and I wished to share it for your consideration:&lt;br /&gt;&lt;br /&gt;"Don't try to be original, just try to be good."&lt;br /&gt;- &lt;a href="http://en.wikipedia.org/wiki/Paul_Rand"&gt;Paul Rand&lt;/a&gt;.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=G4vkfOB"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=G4vkfOB" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=o4jwJUb"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=o4jwJUb" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=Pxi2WXb"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=Pxi2WXb" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=33fjevb"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=33fjevb" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/188499424/great-quote-paul-rand.html" title="Great Quote: Paul Rand" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=1190218230033699883" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/1190218230033699883/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/1190218230033699883" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/1190218230033699883" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2007/11/great-quote-paul-rand.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-6978810230048441384</id><published>2007-11-15T10:33:00.000-08:00</published><updated>2008-01-31T11:37:44.356-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><category scheme="http://www.blogger.com/atom/ns#" term="mongrel" /><category scheme="http://www.blogger.com/atom/ns#" term="swiftiply" /><category scheme="http://www.blogger.com/atom/ns#" term="hosting" /><title type="text">Rails on Swiftiply / Mongrel</title><content type="html">Hosting Ruby on Rails is complicated, right?  Not necessarily.  Let's take a look at a fast and flexible way to serve up your Rails application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Rails on Swiftiply / Mongrel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;If you have done any reading or work with Rails you have probably heard of &lt;a href="http://mongrel.rubyforge.org/"&gt;Mongrel&lt;/a&gt;.  According to the Mongrel site, "Mongrel is a fast HTTP library and server for Ruby".&lt;br /&gt;&lt;br /&gt;You may not have heard of &lt;a href="http://swiftiply.swiftcore.org/"&gt;Swiftiply&lt;/a&gt; yet.  But you will.  Well, actually I guess you just did.  But you will no doubt be hearing &lt;span style="font-weight: bold;"&gt;more&lt;/span&gt; about it.  Swiftiply "is a very fast, narrowly targetted clustering proxy".  The Swiftiply website says "scaling your web applications should be easy".  Sounds good to me.  Let's see if it is!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;"&gt;Prerequisites&lt;/span&gt;&lt;br /&gt;We will assume that you have already properly installed and configured the following:&lt;br /&gt;Ruby&lt;br /&gt;RubyGems&lt;br /&gt;Rails&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Version Info&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Here are the most recent versions tested at the time of this article.  Different versions may cause varying results.&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;OS: Ubuntu 7.10&lt;/li&gt;&lt;li&gt;Ruby: 1.8.6&lt;/li&gt;&lt;li&gt;RubyGems: 1.0.1&lt;/li&gt;&lt;li&gt;Swiftiply: 0.6.1.1&lt;/li&gt;&lt;li&gt;Mongrel: 1.1.3&lt;/li&gt;&lt;li&gt;Rails: 2.0.2&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Installation: It's a breeze.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;sudo gem install mongrel --include-dependencies&lt;br /&gt;sudo gem install swiftiply --include-dependencies&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;I told you it was a breeze.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Configuration: Piece of cake.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Let's go ahead and configure Swiftiply first.  Swiftiply does not install a configuration file for you, so you are creating a new blank file in the following step:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;sudo vim /etc/swiftiply.conf&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;Here is the configuration that I used:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;cluster_address: 123.45.678.9  # Use your IP here&lt;br /&gt;cluster_port: 80&lt;br /&gt;daemonize: true&lt;br /&gt;epoll: true&lt;br /&gt;epoll_descriptors: 20000&lt;br /&gt;map:&lt;br /&gt;- incoming:&lt;br /&gt; - sample.com&lt;br /&gt; - www.sample.com&lt;br /&gt;outgoing: 127.0.0.1:30000 # Where Mongrels will connect&lt;br /&gt;default: true&lt;br /&gt;docroot: /var/www/sample.com/current # Rails root&lt;br /&gt;cache_directory: public&lt;br /&gt;redeployable: true&lt;br /&gt;cache_extensions:&lt;br /&gt; - htm&lt;br /&gt; - html&lt;br /&gt; - txt&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;Amazingly that is all that is required in the way of configuration.  If you wanted to serve up other applications on other domains or sub-domains, simply repeat the "map:" section for each.&lt;br /&gt;&lt;br /&gt;Start up Swiftiply with:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;swiftiply -c /etc/swiftiply.conf&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;With Swiftiply running, now all you need to do is start Mongrel(s) from within the directory of the Rails app you wish to serve.  We let the system know that we want to use the special Swiftiply version of Mongrel with the "env SWIFT=1" directive.  We also tell them to connect to the IP and port that you defined in your swiftiply.conf, like so:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;env SWIFT=1 mongrel_rails start -d -a 127.0.0.1 -p 30000&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;You may also wish to include the directive "-e production", but I ran out of room on the line! ;)&lt;br /&gt;&lt;br /&gt;Now if you want multiple mongrels serving up your app, just start another one up exactly the same.  Same IP and port.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;And now... your done.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;And that is it.  You have your basic Swiftiply / Mongrel stack setup.&lt;br /&gt;&lt;br /&gt;Keep your eyes on Swiftiply as there will be some exciting new features be adding in the coming weeks and months.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;"&gt;Performance&lt;/span&gt;&lt;br /&gt;With a blank Rails 1.2.5 application I show the following memory usages in "top":&lt;br /&gt;&lt;br /&gt;Ruby (Mongrel): 47M&lt;br /&gt;Swiftiply: 17M&lt;br /&gt;&lt;br /&gt;For some statistics on performance of Swiftiply, please see the post "&lt;a href="http://www.webficient.com/2007/08/testing-various-configurations-of-rails.html"&gt;Testing Various Configurations of Rails, Merb, Swiftiply and Nginx&lt;/a&gt;" on Webficient.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;"&gt;Stuff To Know&lt;/span&gt;&lt;br /&gt;Here are a couple things to remember about Swiftiply as you are setting it up:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Each application you wish to serve will be linked to ONE port.&lt;/li&gt;&lt;li&gt;All mongrels serving that application will connect to the exact same ONE port.&lt;/li&gt;&lt;li&gt;Even if you have (n) mongrels, they all connect to the exact same ONE port per application.&lt;/li&gt;&lt;li&gt;Swiftiply can serve multiple applications, just repeat the part from "map:" down in the swiftiply.conf file assigning your new application a single unique port.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Useful?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;If so, why not &lt;a href="http://www.workingwithrails.com/recommendation/new/person/6666-justin-pease"&gt;recommend me on Working With Rails&lt;/a&gt;!&lt;/div&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=y5GaMxB"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=y5GaMxB" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=NtfjNlb"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=NtfjNlb" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=eIn7H5b"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=eIn7H5b" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=OdoPXdb"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=OdoPXdb" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/185366978/rails-on-swiftiply-mongrel.html" title="Rails on Swiftiply / Mongrel" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=6978810230048441384" title="5 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/6978810230048441384/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/6978810230048441384" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/6978810230048441384" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2007/11/rails-on-swiftiply-mongrel.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-6221873662644164086</id><published>2007-11-12T07:44:00.000-08:00</published><updated>2007-11-12T08:16:03.290-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="book review" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><category scheme="http://www.blogger.com/atom/ns#" term="active record" /><title type="text">Book Review: Pro Active Record</title><content type="html">Title: Pro Active Record: Databases with Ruby and Rails.&lt;br /&gt;Authors: Kevin Marshall, Chad Pytel, and Jon Yurek&lt;br /&gt;&lt;br /&gt; Visuals:&lt;br /&gt;Font size and layout are good.  Easy on the eyes.  Large and frequent sub-headings make it easier to locate information.&lt;br /&gt;&lt;br /&gt;Audience:&lt;br /&gt;The book lists it's intended "User level" at "Intermediate-Advanced".&lt;br /&gt;&lt;br /&gt;Practicality:&lt;br /&gt;It really depends on what you are expecting.  I've been using Rails and ActiveRecord for about 2 years, so I should fit into the target audience.  After reading the book I think it will be a great reference book to have within arm's reach while working with ActiveRecord.  To me it will serve as an API to AR.  So it will be practical in that sense. &lt;br /&gt;&lt;br /&gt;On the other hand, while reading it I never experienced any "aha!" moments where I felt like I learned something new or exciting, which I had hoped for.&lt;br /&gt;&lt;br /&gt;If you are a beginner (never having used AR) it will definitely save you time (and eye strain) hunting down tutorials on blogs.&lt;br /&gt;&lt;br /&gt;Overall:&lt;br /&gt;It's a good Active Record reference &amp;amp; usage tutorial(s).  I would have appreciated this book even more when I was first starting to use the Ruby on Rails framework.  So if you are a beginner, don't let the "Intermediate - Advanced" user level scare you off.  Active Record is not a terribly complicated subject, and if you are using Rails (as a beginner or not) you will probably be using Active Record too.&lt;br /&gt;&lt;br /&gt;I was kind of surprised when I read the Introduction to the book that it starts off with:&lt;br /&gt;&lt;br /&gt;"Is there really enough to talk about in Active Record to fill a whole book?"&lt;br /&gt;&lt;br /&gt;"Our answer, then and now, is, "Yes and no""&lt;br /&gt;&lt;br /&gt;As an "Intermediate - Advanced" user, that's kind of how I felt at the end of this "Pro" book.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=8vasTxB"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=8vasTxB" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=HuUt5Qb"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=HuUt5Qb" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=BacMUAb"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=BacMUAb" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=WB7q34b"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=WB7q34b" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/183637952/book-review-pro-active-record.html" title="Book Review: Pro Active Record" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=6221873662644164086" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/6221873662644164086/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/6221873662644164086" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/6221873662644164086" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2007/11/book-review-pro-active-record.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-4667921518787177103</id><published>2007-11-07T08:02:00.000-08:00</published><updated>2008-02-25T15:15:20.296-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="datamapper" /><category scheme="http://www.blogger.com/atom/ns#" term="merb" /><title type="text">Merb &amp; Datamapper: Getting Rolling</title><content type="html">Today we want to take a look at &lt;a href="http://merbivore.org/"&gt;Merb&lt;/a&gt; and &lt;a href="http://www.datamapper.org/"&gt;DataMapper&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;NOTE:&lt;/span&gt; I'm doing this run through on OS X.  If you are using a different OS, some of the instructions may need modifications (specifically in regards to path locations).  This post also assumes that you are using MySQL, which you should already have installed (including the MySQL gem).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Merb: A Web Framework&lt;/span&gt;.&lt;br /&gt;&lt;strike&gt;Yesterday marked the 0.4 release of Merb.  At this point it should be fairly stable.  Stable enough to make it, at the very least, worth a run through.&lt;/strike&gt;  A few months have passed since the original tutorial, and since then Merb has released versions 0.4.1, 0.4.2, 0.5.0, 0.5.1, 0.5.2 and 0.5.3.  Since 0.5.3 there has been a large amount of work done in putting together the 0.9.x release.  At the time of this update, 0.9 is a "developer" release.  I will be updating these instructions soon.&lt;br /&gt;&lt;br /&gt;Merb, like Ruby on Rails, is an MVC web framework.  The Merb project has goals of being performance oriented and providing flexibility through plugins.  This should allow a developer to better mix and match available tool sets to the specific needs of any given project.&lt;br /&gt;&lt;br /&gt;One of the areas of flexibility that Merb provides is in the use of an Object Relational Mapper (ORM).  You may have heard of, or be familiar with, ActiveRecord which is the ORM provided by default within the Ruby on Rails framework.  You can use ActiveRecord with Merb, but you also have other ORM options such as DataMapper and Sequel.&lt;br /&gt;&lt;br /&gt;So let's get started.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Installation (outdated - still is 0.4 based)&lt;/span&gt;&lt;br /&gt;First off you need to get Merb &amp;amp; DataMapper installed on your machine.  Assuming that you already have Ruby and Gems installed on your system, installation is as simple as:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;pre&gt;&lt;code&gt;sudo gem install merb --include-dependencies&lt;br /&gt;sudo gem install datamapper&lt;br /&gt;&lt;/code&gt;&lt;code&gt;sudo gem install ruby2ruby --include-dependencies&lt;/code&gt;&lt;br /&gt;&lt;code&gt;sudo gem install merb_datamapper ??&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;UPDATE: Merb does depend on the json gem (json_pure if you want to use it on jruby).  This "should" be installed when you install "merb --include-dependencies", but some readers have reported that it wasn't.  So just to be safe, run:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;pre&gt;&lt;code&gt;sudo gem install json&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;Lastly, we need to make sure DataObjects.rb drivers are installed. You should now be able to install as a gem:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;pre&gt;&lt;code&gt;sudo gem install do_mysql&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;UPDATE (12/11/07): benr75 reports: "The do_mysql gem is currently broken and refers to an absolute path for MySQL that may not exist on users systems.  &lt;a href="http://blog.kineticweb.com/articles/2007/12/06/bad-do_mysql-0-2-2-gem" rel="nofollow"&gt;Fix instructions here.&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;Other possibly useful resources are: &lt;a href="http://blog.heimidal.net/2007/10/30/installing-datamapper-on-leopard"&gt;post on Blog::Heimidal&lt;/a&gt; and the DataMapper &lt;a href="http://datamapper.org/getting_started.html"&gt;Getting Started page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Assuming everything went smoothly for you, we are now ready to roll.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Generate &amp;amp; Configure Your New Merb Project (updated to 0.9)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Next we will be generating the default framework files.&lt;br /&gt;&lt;br /&gt;Change to the directory where you wish to create your Merb project.  For me that was:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;pre&gt;&lt;code&gt;cd /Users/justin/programming/projects/&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;Similar to Rails, to generate the framework code we simply run:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;pre&gt;&lt;code&gt;merb-gen project_name&lt;br /&gt;cd project_name&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;As mentioned before we need to configure our Merb application to let it know that we want to use the DataMapper ORM, and setup our database.  Pretty simple stuff.  Just a few text edits in 2 files.&lt;br /&gt;&lt;br /&gt;First, open &lt;span style="font-weight: bold;"&gt;config/init.rb&lt;/span&gt; and find and uncomment the following line as below:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;pre&gt;&lt;code&gt;### Uncomment for DataMapper ORM&lt;br /&gt;use_orm :datamapper&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;The only other file we need to setup is our database configuration file.  When you initially generated your project code Merb did not create this file.  Why?  Because you hadn't yet told it what ORM you wanted to use.&lt;br /&gt;&lt;br /&gt;Since we have edited the dependencies.rb file to indicate we will be using the DataMapper ORM, all we now need to do is load the Merb framework and it will auto-generate a sample database configuration file for us.  This sample file will be based on the specific requirements of the ORM we have chosen.  So from the command line run:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;pre&gt;&lt;code&gt;merb&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;Easy.  Merb saw that you wanted to use DataMapper, but no database has been configured.  Automatically the database.sample.yml file was then generated.  Now let's finish up our configuration of Merb.  Open &lt;span style="font-weight: bold;"&gt;config/database.sample.yml &lt;/span&gt;and edit it according to your specific setup.  For example mine looks like:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;---&lt;br /&gt;# This is a sample database file for the DataMapper ORM&lt;br /&gt;:development: &amp;amp;defaults&lt;br /&gt;:adapter: mysql&lt;br /&gt;:database: merbtest_development&lt;br /&gt;:username: root&lt;br /&gt;:password:&lt;br /&gt;:host: localhost&lt;br /&gt;&lt;br /&gt;:test:&lt;br /&gt;&lt;&lt;: *defaults      :database: merbtest_test              :production:      &lt;&lt;: *defaults      :database: merbtest_production&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;Don't forget to copy or rename the file to database.yml.&lt;br /&gt;&lt;br /&gt;Also, the databases that you just configured in database.yml need to actually exist, so if you haven't done so already please take a moment to create them now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;That's It!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;With those two simple configuration steps, our bare bones application should now be ready to roll.  To start up, from within your application directory type:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;pre&gt;&lt;code&gt;merb&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;By default Merb is setup to run on port 4000 of host 0.0.0.0.  So open up your browser and point it to:&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;pre&gt;&lt;code&gt;http://0.0.0.0:4000/&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;You should now see the Merb default page before you.&lt;br /&gt;&lt;br /&gt;If you wish to adjust the IP address or port number that Merb runs on, that is configurable from the &lt;strike&gt;&lt;span style="font-weight: bold;"&gt;config/merb.yml&lt;/span&gt;&lt;/strike&gt; config/init.rb file.&lt;br /&gt;&lt;br /&gt;That's it for this post.  In the next post we will actually make our Merb app do something.&lt;br /&gt;&lt;br /&gt;Until then you can get some basic ideas of how to wire things together &lt;a href="http://paulbarry.com/articles/2007/11/16/merb-and-data-mapper"&gt;in this post on PaulBarry.com&lt;/a&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=bJeFMxB"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=bJeFMxB" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=XooHs5b"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=XooHs5b" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=l4ToC6b"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=l4ToC6b" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=syH4WTb"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=syH4WTb" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/181190323/merb-datamapper-getting-rolling.html" title="Merb &amp; Datamapper: Getting Rolling" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3545886534042322597&amp;postID=4667921518787177103" title="4 Comments" /><link rel="replies" type="application/atom+xml" href="http://jit.nuance9.com/feeds/4667921518787177103/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://jit.nuance9.com/feeds/posts/default/4667921518787177103" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3545886534042322597/posts/default/4667921518787177103" /><author><name>Justin Pease</name><uri>http://www.blogger.com/profile/00062669138144919279</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://jit.nuance9.com/2007/11/merb-datamapper-getting-rolling.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-3545886534042322597.post-3204861194548371840</id><published>2007-10-31T10:48:00.000-07:00</published><updated>2007-10-31T11:25:48.602-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="knowledge investment" /><category scheme="http://www.blogger.com/atom/ns#" term="education" /><category scheme="http://www.blogger.com/atom/ns#" term="book review" /><title type="text">Continued Education</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_pGfdZQGFgvE/RyjGGeY_jfI/AAAAAAAAAEI/ZrIrl-S_13c/s1600-h/school_200x133.shkl.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://bp2.blogger.com/_pGfdZQGFgvE/RyjGGeY_jfI/AAAAAAAAAEI/ZrIrl-S_13c/s320/school_200x133.shkl.jpg" alt="" id="BLOGGER_PHOTO_ID_5127565990300716530" border="0" /&gt;&lt;/a&gt;The web moves fast, and we as it's craftsman must keep pace.&lt;br /&gt;&lt;br /&gt;Fortunately, along with the ever changing technologies we also find ever improving access to information.  Here are a few of the recent items that I have included in my personal education program:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;The Tried and True&lt;/span&gt;&lt;br /&gt;Books.  They have been around for thousands of years, and still are great.  I recently have been reading "&lt;b&gt;&lt;a type="amzn" asin="0596529309"&gt;High Performance Web Sites: Essential Knowledge for Front-End Engineers&lt;/a&gt;" &lt;/b&gt;by Chief Performance Yahoo! Steve Souders.  The 14 rules can be found elsewhere, but this book let's you get Steve's explanations of why these rules are important - providing supportive evidence and comparisons as well.&lt;br /&gt;&lt;br /&gt;If you feel it is important to understand not just "how", but also "why", then get the above book.  At less than $30 it is an inexpensive investment in your education.   I also appreciate that it is concise - get the info and go.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Internet Age Education&lt;/span&gt;&lt;br /&gt;The Internet opens some great windows of opportunity for personal education.&lt;br /&gt;&lt;br /&gt;For example, it allows us to &lt;a href="http://mitworld.mit.edu/video/308/"&gt;watch a lecture at MIT's Sloan Business school by Ricardo Semler&lt;/a&gt;, CEO of Semco from the comfort of our favorite chair.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Almost Like Being There&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.confreaks.com/"&gt;Confreaks.com&lt;/a&gt; is a really great idea that I hope continues.  Thus far they have recorded and posted videos for talks held at RubyHoeDown 2007 and MountainWest RubyConf 2007.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;What Is In Your Curriculum?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;What about you?  What have you been learning lately?&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=75SzdrA"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=75SzdrA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=0rc5BTa"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=0rc5BTa" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=snDqlma"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=snDqlma" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nuance9/jit?a=28dcqUa"&gt;&lt;img src="http://feeds.feedburner.com/~f/nuance9/jit?i=28dcqUa" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/nuance9/jit/~3/177828441/continued-educati