<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">

<channel>
	<title>nanoRAILS</title>
	
	<link>http://nanorails.com</link>
	<description>Ruby on Rails in practice, and more...</description>
	<lastBuildDate>Tue, 08 Mar 2011 20:25:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Nanorails" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="nanorails" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-sa/2.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">Nanorails</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>The smallest git tutorial you’ll ever need</title>
		<link>http://nanorails.com/articles/2010/10/01/the-smallest-git-tutorial-youll-ever-need/</link>
		<comments>http://nanorails.com/articles/2010/10/01/the-smallest-git-tutorial-youll-ever-need/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 06:31:25 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[Just Enough]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://nanorails.com/?p=28363</guid>
		<description><![CDATA[Let me preface with this:  this is over-simplified for someone just getting started with git, who does not have the time to learn all the intricacies of git, and covers the most common workflow I've encountered, that is:
- download code from a remote repository
- make changes
- commit and send the changes back
- get the latest from that remote repository
]]></description>
			<content:encoded><![CDATA[<p>Let me preface with this:  this is over-simplified for someone just getting started with git, who does not have the time to learn all the intricacies of git, and covers the most common workflow I&#8217;ve encountered, that is:<br />
- download code from a remote repository<br />
- make changes<br />
- commit and send the changes back<br />
- get the latest from that remote repository</p>
<p>So, here goes:</p>
<p>First you&#8217;ll need to <a href="http://book.git-scm.com/2_installing_git.html">install git</a> is it is not aleady installed.</p>
<h2>Checkout a project</h2>
<p><code>git clone http://github.com/psq/spider.git</code></p>
<h2>Commit</h2>
<p>Edit files as you see fit, then when time comes to commit your changes back in:</p>
<p><code>git status</code></p>
<p>will show you what files you&#8217;ve modified.  Or added.  If you added any files, add them to the files controlled by git (this also works with a new directory and will recursively add everything)</p>
<p><code>git add README.txt</code></p>
<p>Then commit all</p>
<p><code>git commit -a -m "added readme"</code></p>
<p>-m option adds a messages, -a adds all modified files to the commit</p>
<h2>Upload your changes</h2>
<p>Then push your changes back to the original repo</p>
<p><code>git push origin master</code></p>
<h2>Download the latest version</h2>
<p>And finally, to get any updates from the master repo (you may need to do this before doing the push above)</p>
<p><code>git pull origin master</code></p>
<p>This is overly simplified on purpose, but will give any beginner time to dive in deeper when time permits.</p>
<p>See this previous post for some <a href="http://nanorails.com/articles/2008/12/31/global-git-shortcuts/ ">helpful git shortcuts</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/FfEoicMjzBLBg-bsp2IJAE5osfc/0/da"><img src="http://feedads.g.doubleclick.net/~a/FfEoicMjzBLBg-bsp2IJAE5osfc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/FfEoicMjzBLBg-bsp2IJAE5osfc/1/da"><img src="http://feedads.g.doubleclick.net/~a/FfEoicMjzBLBg-bsp2IJAE5osfc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=A70IDoXffQ4:Va7LfXPbVig:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=A70IDoXffQ4:Va7LfXPbVig:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=A70IDoXffQ4:Va7LfXPbVig:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2010/10/01/the-smallest-git-tutorial-youll-ever-need/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multiple targets with iscisitarget (ubuntu 9.04)</title>
		<link>http://nanorails.com/articles/2010/01/20/multiple-targets-with-iscisitarget-ubuntu-9-04/</link>
		<comments>http://nanorails.com/articles/2010/01/20/multiple-targets-with-iscisitarget-ubuntu-9-04/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 06:23:00 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Quid Pro Quo]]></category>
		<category><![CDATA[iscsi]]></category>

		<guid isPermaLink="false" />
		<description><![CDATA[After trying for a (long) while to have multiple targets defined on the same host, and having my initiator to see both, the solution what in fact simple: Use different values for the <span class="caps">LUN</span>!]]></description>
			<content:encoded><![CDATA[<p>After trying for a (long) while to have multiple targets defined on the same host, and having my initiator to see both, the solution what in fact simple: Use different values for the <span class="caps">LUN</span>!</p>
<p>Here’s a snippet of /etc/ietd.conf</p>
<p><code> </code></p>
<pre>Target iqn.2010-01.com.test:storage.disk1.sys1.000
        Lun 0 Path=/media/usb/test0.img,Type=fileio,IOMode=rw
Target iqn.2010-01. com.test:storage.disk1.sys1.001
        Lun 1 Path=/home/psq/test1.img,Type=fileio,IOMode=rw</pre>
<p>Then don’t forget to restart: “service iscsitarget restart”</p>

<p><a href="http://feedads.g.doubleclick.net/~a/5NkPQKIkPWUp8T06_hOwshSKemQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/5NkPQKIkPWUp8T06_hOwshSKemQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/5NkPQKIkPWUp8T06_hOwshSKemQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/5NkPQKIkPWUp8T06_hOwshSKemQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=f3-FZD9Kbuk:Ro2eosQjYao:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=f3-FZD9Kbuk:Ro2eosQjYao:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=f3-FZD9Kbuk:Ro2eosQjYao:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2010/01/20/multiple-targets-with-iscisitarget-ubuntu-9-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rebuild the journal on an ext3 partition for CentOS 5.3</title>
		<link>http://nanorails.com/articles/2010/01/16/rebuild-the-journal-on-an-ext3-partition-for-centos-5-3/</link>
		<comments>http://nanorails.com/articles/2010/01/16/rebuild-the-journal-on-an-ext3-partition-for-centos-5-3/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 23:22:00 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ext3]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false" />
		<description><![CDATA[<a href="http://www.heltech.se/index.php/en/knowledge-base/13-linux/51-rebuild-the-journal-in-a-ext3-journaled-filesystem">Heltech</a> does not have it quite right for centos.  The options are named slightly differently on newer versions.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.heltech.se/index.php/en/knowledge-base/13-linux/51-rebuild-the-journal-in-a-ext3-journaled-filesystem">Heltech</a> does not have it quite right for centos.  The options are named slightly differently on newer versions.</p>
<p>Here’s the correct sequence for CentOS 5.3</p>
<ul>
<li>Boot in single mode</li>
<li>umount the main partition</li>
<li>check the partition for errors</li>
<li>remove the journal</li>
<li>remount</li>
<li>recreate the journal</li>
<li>for good measure, check the partition for errors</li>
</ul>
<p>or, in other words:<br />
<code> </code></p>
<pre># fsck /dev/VolGroup00/LogVol00
# umount /dev/VolGroup00/LogVol00
# tune2fs -O ^has_journal /dev/VolGroup00/LogVol00
# mount -n -o remount,rw /dev/VolGroup00/LogVol00
# tune2fs -j /dev/VolGroup00/LogVol00
# umount /dev/VolGroup00/LogVol00
# fsck -f /dev/VolGroup00/LogVol00</pre>
<p>Note: this should also work on CentOS 5.4</p>

<p><a href="http://feedads.g.doubleclick.net/~a/GuZXqVQ_U3iRL7dVBd_u9KpV_Eg/0/da"><img src="http://feedads.g.doubleclick.net/~a/GuZXqVQ_U3iRL7dVBd_u9KpV_Eg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/GuZXqVQ_U3iRL7dVBd_u9KpV_Eg/1/da"><img src="http://feedads.g.doubleclick.net/~a/GuZXqVQ_U3iRL7dVBd_u9KpV_Eg/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=8GYsifpfs8k:Ro2eosQjYao:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=8GYsifpfs8k:Ro2eosQjYao:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=8GYsifpfs8k:Ro2eosQjYao:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2010/01/16/rebuild-the-journal-on-an-ext3-partition-for-centos-5-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>global git shortcuts</title>
		<link>http://nanorails.com/articles/2008/12/31/global-git-shortcuts/</link>
		<comments>http://nanorails.com/articles/2008/12/31/global-git-shortcuts/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 10:49:09 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false" />
		<description><![CDATA[Here's my ~/.gitconfig file for convenient shortcuts.  This way, you can use "git st" instead of "git status"...]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s my ~/.gitconfig file for convenient shortcuts.  This way, you can use &#8220;git st&#8221; instead of &#8220;git status&#8221;&#8230;</p>
<p><code>
<pre>
[user]
name = Pascal
[color]
status = auto
diff = auto
branch = auto
[alias]
st = status
ci = commit
co = checkout
[merge]
tool = opendiff
</pre>
<p></code></p>

<p><a href="http://feedads.g.doubleclick.net/~a/5S_xIMe4jeVM6zeYrLBMyeV_KWM/0/da"><img src="http://feedads.g.doubleclick.net/~a/5S_xIMe4jeVM6zeYrLBMyeV_KWM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/5S_xIMe4jeVM6zeYrLBMyeV_KWM/1/da"><img src="http://feedads.g.doubleclick.net/~a/5S_xIMe4jeVM6zeYrLBMyeV_KWM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=5NBN4o7Av_k:Ro2eosQjYao:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=5NBN4o7Av_k:Ro2eosQjYao:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=5NBN4o7Av_k:Ro2eosQjYao:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2008/12/31/global-git-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>closing comments</title>
		<link>http://nanorails.com/articles/2008/12/17/closing-comments/</link>
		<comments>http://nanorails.com/articles/2008/12/17/closing-comments/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 05:34:00 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false" />
		<description><![CDATA[<p>The spammers won (well not really), after getting tired of deleting spam en masse (by the thousands every other months or so), I decided to close comments on some older posts that happen to have a better page rank than most.  If you really need to get to me, please feel free to use the <a href="/feedback">Contact me page</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The spammers won (well not really), after getting tired of deleting spam en masse (by the thousands every other months or so), I decided to close comments on some older posts that happen to have a better page rank than most.  If you really need to get to me, please feel free to use the <a href="/feedback">Contact me page</a></p>
<p>Even though I&#8217;ve been considering this for a while, this was in part prompted by Jesper of <a href="http://justaddwater.dk/2008/12/17/time-to-revise-our-comment-policy/">Just add water</a></p>
<p>His comment policy is simple:</p>
<blockquote><p>
In the future we will probably mark all of the above comment types as spam. Yes, some of the comments actually add value, but most of the comments actually are just made to improve ranking.</p>
<p>We will continue to manually approve the comments we mean will add value.</p>
<p>We will continue to hold comments for manual moderation. (so if your valid comment does not show up within a few hours, please contact us).</p></blockquote>
<p>Actually, mine is even simpler.</p>
<blockquote><p>
- you must pass the Akismet test.</p>
<p>- you must pass my own test:  I review anything Akismet approves and will delete anything that looks, sounds or smells like spam.  So even if your comment gets approved initially, I reserve the right to remove it.  If that sounds arbitrary, so be it.  Although I believe I have been quite fair in the past and will continue to be. </p></blockquote>
<p>Disagree?  Send me your <a href="/feedback">feedback</a></p>
<p>Unrelated note: Did you check out <a href="http://twitteressentials.com">Twitter Essentials</a> ?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/AkpRTvMJ1XOMQlmZRjs2ZogzdBo/0/da"><img src="http://feedads.g.doubleclick.net/~a/AkpRTvMJ1XOMQlmZRjs2ZogzdBo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/AkpRTvMJ1XOMQlmZRjs2ZogzdBo/1/da"><img src="http://feedads.g.doubleclick.net/~a/AkpRTvMJ1XOMQlmZRjs2ZogzdBo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=lyEHBVxPQzk:Ro2eosQjYao:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=lyEHBVxPQzk:Ro2eosQjYao:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=lyEHBVxPQzk:Ro2eosQjYao:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2008/12/17/closing-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>merb 1.0</title>
		<link>http://nanorails.com/articles/2008/11/08/merb-1-0/</link>
		<comments>http://nanorails.com/articles/2008/11/08/merb-1-0/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 06:11:00 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[Merb]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[merb]]></category>

		<guid isPermaLink="false" />
		<description><![CDATA[<p><a href="http://merbivore.com/">merb</a> has reached 1.0.  What a tremendous achievement from all all contributors, and <a href="http://brainspl.at/">Ezra</a> more specifically and <a href="http://www.yehudakatz.com/">Wycats</a></p>


If you can&#8217;t wait, use]]></description>
			<content:encoded><![CDATA[<p><a href="http://merbivore.com/">merb</a> has reached 1.0.  What a tremendous achievement from all all contributors, and <a href="http://brainspl.at/">Ezra</a> more specifically and <a href="http://www.yehudakatz.com/">Wycats</a></p>
<p>If you can&#8217;t wait, use<br />
<code>
<pre> gem install merb --source http://edge.merbivore.com</pre>
<p></code></p>
<p>Should be available by tomorrow on your regular gem mirror</p>
<p><code>
<pre>gem install merb</pre>
<p></code></p>
<p>Cheers!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Ey8vMHQMwCtvGkER4XDr18kAZfo/0/da"><img src="http://feedads.g.doubleclick.net/~a/Ey8vMHQMwCtvGkER4XDr18kAZfo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Ey8vMHQMwCtvGkER4XDr18kAZfo/1/da"><img src="http://feedads.g.doubleclick.net/~a/Ey8vMHQMwCtvGkER4XDr18kAZfo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=gqrnu-nil3k:Ro2eosQjYao:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=gqrnu-nil3k:Ro2eosQjYao:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=gqrnu-nil3k:Ro2eosQjYao:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2008/11/08/merb-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Index your DataMapper Models with Xapian</title>
		<link>http://nanorails.com/articles/2008/09/24/index-your-datamapper-models-with-xapian/</link>
		<comments>http://nanorails.com/articles/2008/09/24/index-your-datamapper-models-with-xapian/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 06:48:00 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[DataMapper]]></category>
		<category><![CDATA[Merb]]></category>
		<category><![CDATA[merb]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[xapian]]></category>

		<guid isPermaLink="false" />
		<description><![CDATA[<p>Still pretty preliminary, but the basics seem to work.  <a href="http://github.com/psq/dm-xapian/tree/master">dm-xapian</a> is a Merb plugin to index your <a href="http://datamapper.org">DataMapper</a> models with <a href="http://xapian.org/">Xapian</a></p>


	<p>At this point the details are still sketchy, and you first need to install xapian, then the xapian ruby bindings: <a href="http://github.com/psq/dm-xapian/tree/master/SETUP.txt">Install Xapian and ruby bindings</a></p>


	<p>Then it gets easier:</p>


* build the gem with]]></description>
			<content:encoded><![CDATA[<p>Still pretty preliminary, but the basics seem to work.  <a href="http://github.com/psq/dm-xapian/tree/master">dm-xapian</a> is a Merb plugin to index your <a href="http://datamapper.org">DataMapper</a> models with <a href="http://xapian.org/">Xapian</a></p>
<p>At this point the details are still sketchy, and you first need to install xapian, then the xapian ruby bindings: <a href="http://github.com/psq/dm-xapian/tree/master/SETUP.txt">Install Xapian and ruby bindings</a></p>
<p>Then it gets easier:</p>
<p>* build the gem with<br />
<code>rake install</code><br />
* add the dependency<br />
<code>dependencies "dm-xapian"</code><br />
* create the dm-xapian resource<br />
<code>rake dm:autoupgrade</code><br />
* tell dm-xapian to index your models (Er, Resources) with something like:<br />
<code><br />
  is_indexed :texts =&gt; [ :name, :region, :country, :varietal ],<br />
     :values =&gt; [[:price, 0, "price", :float], [:ean, 1, "ean", :string]],<br />
     :terms =&gt; [ [ :winery, 'W', "winery" ] ]<br />
</code><br />
* build the index with<br />
<code>rake xapian:rebuild_index models="Wine Winery"</code><br />
* build the index with<br />
<code>rake xapian:update_index models="Wine Winery"</code><br />
This will remove from the index any model destroyed or update any model since the last call to xapian:rebuild_index or xapian:update_index<br />
* Run a query<br />
<code>rake xapian:query query="edited 6" models="Wine Winery" verbose=true limit=25</code></p>
<p>Of course, running a query via rake is not so useful, but that&#8217;s all I tried so far.  But at least this proved that the index was built correctly, and integrated search to an app is next.</p>
<p>As you may have noticed already, a big thing lacking at this point are specs.</p>
<p>This is in collaboration with <a href="http://github.com/joshaven">Joshaven</a> and based on the awesome work by <a href="http://www.flourish.org/blog">Francis Irving</a> on <a href="http://github.com/frabcus/acts_as_xapian/tree/master">act_as_xapian</a> who created the Rails+ActiveRecord version.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/v9mWuZpjVwXlimDWh5bASYLcP7Y/0/da"><img src="http://feedads.g.doubleclick.net/~a/v9mWuZpjVwXlimDWh5bASYLcP7Y/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/v9mWuZpjVwXlimDWh5bASYLcP7Y/1/da"><img src="http://feedads.g.doubleclick.net/~a/v9mWuZpjVwXlimDWh5bASYLcP7Y/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=73--PHRc-J8:Ro2eosQjYao:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=73--PHRc-J8:Ro2eosQjYao:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=73--PHRc-J8:Ro2eosQjYao:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2008/09/24/index-your-datamapper-models-with-xapian/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>EAN UPC Support</title>
		<link>http://nanorails.com/articles/2008/02/20/ean-upc-support/</link>
		<comments>http://nanorails.com/articles/2008/02/20/ean-upc-support/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 07:58:00 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[ean-upc]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false" />
		<description><![CDATA[A ruby gem for EAN/UPC/GTIN calculations. Convert and validate code bars.]]></description>
			<content:encoded><![CDATA[<p><br/><br/><br/></p>
<h1><span class="caps">EAN</span>/UPC/GTIN calculations for Ruby</h1>
<h2>To install the Ruby Gem</h2>
<p><code>
<pre>sudo gem install ean</pre>
<p></code></p>
<h2>What can it do?</h2>
<p>- Validate <span class="caps">UPC</span>/EAN/GTIN identifiers</p>
<p>- Generate check number for <span class="caps">UPC</span>/EAN/GTIN identifiers</p>
<h2>How to use</h2>
<p><br/>Load the gem:<br/><br />
<code>
<pre>require "rubygems"
require "ean"</pre>
<p></code></p>
<p><br/>Convert to a 14 digit <span class="caps">GTIN</span>:<br/><br />
 <code>"1234567890128".to_gtin</code></p>
<p><br/>Check whether a number is a valid 8, 12, 13, 14 <span class="caps">EAN</span>/UPC/GTIN number<br/><br />
<code>
<pre>"1-234567-890128".ean?</pre>
<p></code></p>
<p><br/>You can also do<br/><br />
<code>
<pre>"1234567890128".to_gtin.ean?</pre>
<p></code></p>
<p><br/>Given a 7, 11, 12, of 13 digits number, generates the check digit (to be added at the end.<br/><br />
<code>
<pre>"784794001602".generate_check_digit</pre>
<p></code></p>
<p><br/><br/><br/></p>

<p><a href="http://feedads.g.doubleclick.net/~a/bk0NwrYR_cHhoMs_6RkadaIm3iY/0/da"><img src="http://feedads.g.doubleclick.net/~a/bk0NwrYR_cHhoMs_6RkadaIm3iY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/bk0NwrYR_cHhoMs_6RkadaIm3iY/1/da"><img src="http://feedads.g.doubleclick.net/~a/bk0NwrYR_cHhoMs_6RkadaIm3iY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=UVb-VwvfeFk:Ro2eosQjYao:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=UVb-VwvfeFk:Ro2eosQjYao:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=UVb-VwvfeFk:Ro2eosQjYao:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2008/02/20/ean-upc-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ANN: rails-undo-redo</title>
		<link>http://nanorails.com/articles/2008/02/18/ann-rails-undo-redo/</link>
		<comments>http://nanorails.com/articles/2008/02/18/ann-rails-undo-redo/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 09:03:00 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[undo]]></category>

		<guid isPermaLink="false" />
		<description><![CDATA[<p>To this day, very few web apps provide any undo/redo capabilities.  This is really not such a good thing for <a href="http://justaddwater.dk/2008/02/11/3-simple-usability-tips-for-developers/">usability</a>.  There are a few <a href="http://www.37signals.com/svn/archives2/googles_gmail_undo.php">exceptions</a> like gmail, but it does not go <a href="http://designinginterfaces.com/Multi-Level_Undo">far enough</a> to provide what every one is used on their desktop.</p>]]></description>
			<content:encoded><![CDATA[<p>To this day, very few web apps provide any undo/redo capabilities.  This is really not such a good thing for <a href="http://justaddwater.dk/2008/02/11/3-simple-usability-tips-for-developers/">usability</a>.  There are a few <a href="http://www.37signals.com/svn/archives2/googles_gmail_undo.php">exceptions</a> like gmail, but it does not go <a href="http://designinginterfaces.com/Multi-Level_Undo">far enough</a> to provide what every one is used on their desktop.</p>
<p>Ever since I read Assaf&#8217;s <a href="http://blog.labnotes.org/2006/05/23/better-web-apps-add-an-undo-button/">post</a> on the subject, and left hungry for more, as Assaf only helps you on the UI side and leaves you all the heavy lifting, I have been thinking that there must be a way to make it a lot easier to implement undo/redo in a consistent manner, and in a way that is as easy as rails has gotten us used to.</p>
<p>After a few failed attempts, and building on the work of <a href="http://www.workingwithrails.com/person/7964-brian-durand">Brian Durand</a> and his <a href="http://actsasrevisions.rubyforge.org/">Acts As Revisionable</a> and <a href="http://actsasrevisions.rubyforge.org/">ActsAsTrashable</a> plugins, that I&#8217;ve reused (and probably abused as well), I have come to realize a few (obvious?) things, namely that:</p>
<p>for Undo/Redo to work, it needs to</p>
<ul>
<li>Work across all models</li>
<li>Capture the list of changed objects (UndoRecords)</li>
<li>Group these UndoRecords per User Action (UndoActions)</li>
</ul>
<p>Then undo and redo are just a simple matter of replaying the UndoRecords in the right order.</p>
<p>All my previous attempts, and most other plugins I got inspiration from focused on one model, and even though you need this as a building block, for any real application, you need to be able to undo changes across multiple models (even beyond belongs_to, has_many type changes).</p>
<p>When you look at the types of changes to a model in details, you really have 3 types of changes Create, Update and Destroy (these are the C-U-D in <span class="caps">CRUD</span>, even if you are not doing <span class="caps">REST</span>), and undoing each one requires special handling, so this is also tracked and managed by UndoRecord.</p>
<p>To make a long story short, I&#8217;ve packaged all these ideas into a new Rails plugin: <a href="http://blog.nanorails.com/rails-undo-redo" title="RUR">Rails Undo Redo</a> (and very soon a gem as well, because this can <a href="http://blog.jayfields.com/2008/02/shared-ruby-code.html">help</a>, and that&#8217;s also <a href="http://nubyonrails.com/articles/tutorial-publishing-rubygems-with-hoe">easy</a>, or <a href="http://newgem.rubyforge.org/">very easy</a>), you can now easily transform any Rails Application using Active Record into a full fledged multi level undo/redo application like most desktop application.</p>
<p>For a full how-to, read the <a href="http://blog.nanorails.com/rails-undo-redo">Rails Undo Redo project page</a>, or try the <a href="http://rur-demo.nanorails.com/">Rails Undo Redo</a> demo.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/n0KDcDQo8FP51u0aS7k17aAgKG4/0/da"><img src="http://feedads.g.doubleclick.net/~a/n0KDcDQo8FP51u0aS7k17aAgKG4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/n0KDcDQo8FP51u0aS7k17aAgKG4/1/da"><img src="http://feedads.g.doubleclick.net/~a/n0KDcDQo8FP51u0aS7k17aAgKG4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=ly7OuO0BkHc:Ro2eosQjYao:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=ly7OuO0BkHc:Ro2eosQjYao:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=ly7OuO0BkHc:Ro2eosQjYao:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2008/02/18/ann-rails-undo-redo/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>git, submodules and Capistrano</title>
		<link>http://nanorails.com/articles/2008/02/18/git-submodules-and-capistrano/</link>
		<comments>http://nanorails.com/articles/2008/02/18/git-submodules-and-capistrano/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 05:47:00 +0000</pubDate>
		<dc:creator>Pascal</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false" />
		<description><![CDATA[<p>If you use git submodules, as <a href="http://blog.nanorails.com/git-rails">git-rails</a> does, and want to use <a href="http://www.capify.org">Capistano</a>, you&#8217;ll need to patch patch Capistrano (lib/capistano/recipes/deploy/scm/git.rb) to make sure your submodules get included.</p>]]></description>
			<content:encoded><![CDATA[<p>If you use git submodules, as <a href="http://blog.nanorails.com/git-rails">git-rails</a> does, and want to use <a href="http://www.capify.org">Capistano</a>, you&#8217;ll need to patch patch Capistrano (lib/capistano/recipes/deploy/scm/git.rb) to make sure your submodules get included.</p>
<p><code>
<pre>        def checkout(revision, destination)
          git      = command

          branch   = head

          fail "No branch specified, use for example 'set :branch, \"origin/master\"' in your deploy.rb" unless branch

          if depth = configuration[:git_shallow_clone]
            execute  = "#{git} clone --depth #{depth} #{configuration[:repository]} #{destination} &#38;&#38; "
          else
            execute  = "#{git} clone #{configuration[:repository]} #{destination} &#38;&#38; "
          end

          execute += "cd #{destination} &#38;&#38; #{git} checkout -b deploy #{branch}"

          if submodules = configuration[:git_enable_submodules]
            execute += " &#38;&#38; git-submodule init &#38;&#38;"
            execute += "git-submodule update"
          end

          execute
        end</pre>
<p></code></p>
<p>then define this in your deploy.rb:<br />
<code>
<pre>set :git_enable_submodules,1</pre>
<p></code></p>
<p>Or you can use the trunk version (post 2.1), which includes that support already.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/XP9jgFwJY1d9Muwi-J6g2Gc5Rqk/0/da"><img src="http://feedads.g.doubleclick.net/~a/XP9jgFwJY1d9Muwi-J6g2Gc5Rqk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/XP9jgFwJY1d9Muwi-J6g2Gc5Rqk/1/da"><img src="http://feedads.g.doubleclick.net/~a/XP9jgFwJY1d9Muwi-J6g2Gc5Rqk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Nanorails?a=eQnYXGzkt9g:Ro2eosQjYao:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=eQnYXGzkt9g:Ro2eosQjYao:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Nanorails?a=eQnYXGzkt9g:Ro2eosQjYao:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/Nanorails?d=YwkR-u9nhCs" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://nanorails.com/articles/2008/02/18/git-submodules-and-capistrano/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

