<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>All Aboard Rails &#187; ruby on rails</title>
	<atom:link href="http://rails.webintellix.com/tag/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://rails.webintellix.com</link>
	<description>Ruby on Rails fun on Windows</description>
	<lastBuildDate>Tue, 29 Jun 2010 04:14:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Error in Spree rake db:bootstrap issue &#8211; stack level too deep</title>
		<link>http://rails.webintellix.com/2010/05/28/error-in-spree-rake-dbbootstrap-issue-stack-level-too-deep/</link>
		<comments>http://rails.webintellix.com/2010/05/28/error-in-spree-rake-dbbootstrap-issue-stack-level-too-deep/#comments</comments>
		<pubDate>Thu, 27 May 2010 22:00:00 +0000</pubDate>
		<dc:creator>Rupak Ganguly</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Spree]]></category>

		<guid isPermaLink="false">http://rails.webintellix.com/2010/05/28/error-in-spree-rake-dbbootstrap-issue-stack-level-too-deep/</guid>
		<description><![CDATA[I have been working on some Spree based ecommerce stores lately, and I ran into this issue while creating a new Spree project. I had bumped into this a while back but did not write about it then. But, now I have decided to pen it down.
The steps to creating a new Spree project is [...]]]></description>
			<content:encoded><![CDATA[<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F&amp;title=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F&amp;title=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F&amp;title=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F&amp;headline=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep&amp;u=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F&amp;title=Error+in+Spree+rake+db%3Abootstrap+issue+-+stack+level+too+deep&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F28%2Ferror-in-spree-rake-dbbootstrap-issue-stack-level-too-deep%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><p>I have been working on some <a href="http://spreecommerce.com" target="_blank">Spree</a> based ecommerce stores lately, and I ran into this issue while creating a new Spree project. I had bumped into this a while back but did not write about it then. But, now I have decided to pen it down.</p>
<p>The steps to creating a new <a href="http://spreecommerce.com" target="_blank">Spree</a> project is very simple. Assuming that you have Ruby and Rails both installed, you can simply do:</p>
<p>$ gem install spree</p>
<p><code>$ spree mystore</code></p>
<p><code>$ cd mystore</code></p>
<p><code>$ rake db:bootstrap</code></p>
<p><code>$ script/server </code></p>
<p>And, voila you should have a shiny Spree store.</p>
<p>But, I have bumped into an issue at the step <code>$ rake db:bootstrap</code> as shown below:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">$ rake db:bootstrap
<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#9966CC; font-weight:bold;">in</span> c:<span style="color:#006600; font-weight:bold;">/</span>RoRProjs<span style="color:#006600; font-weight:bold;">/</span>wixspree<span style="color:#006600; font-weight:bold;">&#41;</span>
rake aborted!
stack level too deep
c:<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>rake<span style="color:#006600; font-weight:bold;">-</span>0.8.7<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>rake.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">2390</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`raw_load_rakefile'
(See full trace by running task with --trace)</span></pre></div></div>

<p>After a little digging, I found out that Spree has a dependency on the ‘jeweler’ gem which in turn has some kind of dependency on Git.</p>
<p>So, although it seems like a weird solution but just by initializing a git repository on your Spree project folder i.e. mystore in my example, you will be happy to see that the problem is resolved.</p>
<p>So, to recap, in the above steps to create your new Spree project, add a new step before the rake step:</p>
<p><code>$ git init</code></p>
<p><code>$ rake db:bootstrap</code></p>
<p>You should be golden by now. Hope it helps.</p>
<p><strong>Note</strong>: I am running <a href="http://spreecommerce.com" target="_blank">Spree</a> 0.9.4 on Windows Vista and Rails 2.3.5 and Ruby 1.8.6 (ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32])</p>
<p><strong>Note</strong>: If you do not have Git installed, you might want to do that. Here are some excellent articles which show how to do it:</p>
<p><a title="http://github.com/guides/using-git-and-github-for-the-windows-for-newbies" href="http://github.com/guides/using-git-and-github-for-the-windows-for-newbies">http://github.com/guides/using-git-and-github-for-the-windows-for-newbies</a></p>
<p><a title="http://kylecordes.com/2008/git-windows-go" href="http://kylecordes.com/2008/git-windows-go">http://kylecordes.com/2008/git-windows-go</a></p>
<p><a title="http://www.gitcasts.com/posts/git-on-windows" href="http://www.gitcasts.com/posts/git-on-windows">http://www.gitcasts.com/posts/git-on-windows</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rails.webintellix.com/2010/05/28/error-in-spree-rake-dbbootstrap-issue-stack-level-too-deep/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Error in Ruby relative_path_from call on Windows</title>
		<link>http://rails.webintellix.com/2010/05/27/error-in-ruby-relative_path_from-call-on-windows/</link>
		<comments>http://rails.webintellix.com/2010/05/27/error-in-ruby-relative_path_from-call-on-windows/#comments</comments>
		<pubDate>Wed, 26 May 2010 22:00:00 +0000</pubDate>
		<dc:creator>Rupak Ganguly</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[relative_path_from]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Spree]]></category>

		<guid isPermaLink="false">http://rails.webintellix.com/2010/05/27/error-in-ruby-relative_path_from-call-on-windows/</guid>
		<description><![CDATA[I was recently working on some code for building an extension for Spree, when I ran into an issue while generating a extension controller. The error only happens on Windows.
The error in the console looks like this:

$ ruby script/generate extension_controller PromotionManager admin/promotions
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#
version_requirements is deprecated and will be removed on or after August 2010. Use [...]]]></description>
			<content:encoded><![CDATA[<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F&amp;title=Error+in+Ruby+relative_path_from+call+on+Windows" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F&amp;title=Error+in+Ruby+relative_path_from+call+on+Windows" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F&amp;title=Error+in+Ruby+relative_path_from+call+on+Windows" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F&amp;headline=Error+in+Ruby+relative_path_from+call+on+Windows" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Error+in+Ruby+relative_path_from+call+on+Windows&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Error+in+Ruby+relative_path_from+call+on+Windows&amp;u=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Error+in+Ruby+relative_path_from+call+on+Windows&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Error+in+Ruby+relative_path_from+call+on+Windows&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Error+in+Ruby+relative_path_from+call+on+Windows&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F&amp;title=Error+in+Ruby+relative_path_from+call+on+Windows&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Frails.webintellix.com%2F2010%2F05%2F27%2Ferror-in-ruby-relative_path_from-call-on-windows%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><p>I was recently working on some code for building an extension for Spree, when I ran into an issue while generating a extension controller. The error only happens on Windows.</p>
<p>The error in the console looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">$ ruby script<span style="color:#006600; font-weight:bold;">/</span>generate extension_controller PromotionManager admin<span style="color:#006600; font-weight:bold;">/</span>promotions
c:<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>rails<span style="color:#006600; font-weight:bold;">-</span>2.3.5<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>rails<span style="color:#006600; font-weight:bold;">/</span>gem_dependency.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">119</span>:Warning: <span style="color:#6666ff; font-weight:bold;">Gem::Dependency</span><span style="color:#008000; font-style:italic;">#</span>
version_requirements is deprecated <span style="color:#9966CC; font-weight:bold;">and</span> will be removed on <span style="color:#9966CC; font-weight:bold;">or</span> after August 2010. <span style="color:#9900CC;">Use</span> <span style="color:#008000; font-style:italic;">#requirement</span>
Loading haml<span style="color:#006600; font-weight:bold;">-</span>edge gem.
<span style="color:#9900CC;">c</span>:<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>pathname.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">709</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`relative_path_from': different prefix: &quot;c:/&quot; and &quot;C:/RoRPro
js/spreestore&quot; (ArgumentError)
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/lookup.rb:110:in `</span>use_co
mponent_sources!<span style="color:#996600;">'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/lookup.rb:109:in `each'</span>
from c:<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>rails<span style="color:#006600; font-weight:bold;">-</span>2.3.5<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>rails_generator<span style="color:#006600; font-weight:bold;">/</span>lookup.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">109</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`use_co
mponent_sources!'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/lookup.rb:55:in `</span><span style="color:#9966CC; font-weight:bold;">include</span>
d<span style="color:#996600;">'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator.rb:38:in `include'</span>
from c:<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>rails<span style="color:#006600; font-weight:bold;">-</span>2.3.5<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>rails_generator.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">38</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`send'
from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator.rb:38
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `</span>gem_original_require<span style="color:#996600;">'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'</span>
from c:<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>activesupport<span style="color:#006600; font-weight:bold;">-</span>2.3.5<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>active_support<span style="color:#006600; font-weight:bold;">/</span>dependencies.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">1</span>
<span style="color:#006666;">56</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`require'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:5
21:in `</span>new_constants_in<span style="color:#996600;">'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:1
56:in `require'</span>
from script<span style="color:#006600; font-weight:bold;">/</span>generate:<span style="color:#006666;">4</span></pre></div></div>

</pre>
<p>The error is specifically in this line:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">c:<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>pathname.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">709</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`relative_path_from': different prefix: &quot;c:/&quot; and &quot;C:/RoRPro
js/spreestore&quot; (ArgumentError)</span></pre></div></div>

</pre>
<p>After a little digging, it was evident that the <strong>‘relative_path_from’</strong> method in <strong>‘/ruby/lib/ruby/1.8/pathname.rb’</strong> file had the problem. The problem was also described as a ticket at <a href="http://redmine.ruby-lang.org/issues/show/1366">http://redmine.ruby-lang.org/issues/show/1366</a> and the excerpt of the issue is shown below:</p>
<blockquote><p>On Windows, the case of the drive letter can be either upper case or lower case (eg, "C:" or "c:") on the same machine at the same time in different Command Prompt Windows (see below for details). Dir.pwd will return either lower-case or upper-case for the drive letter (“C:/” or “c:/”) depending on the Command Prompt it is run from. However, <strong>FILE</strong> always uses lower-case drive letter. This can cause an ArgumentError when comparing Dir.pwd and <strong>FILE</strong> using Pathname#relative_path_from. This happens with version 1.9.1p0 as well. Pathname#relative_path_from should deal with the case where the case of the argument is different.</p></blockquote>
<p>Note, that I have both my ruby install folder and my project folder on c: drive. And, I am running Ruby 1.8.6  - ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]</p>
<p><strong>Solution</strong></p>
<p>I monkey-patched the following lines in pathname.rb file as shown below.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> relative_path_from<span style="color:#006600; font-weight:bold;">&#40;</span>base_directory<span style="color:#006600; font-weight:bold;">&#41;</span>
dest_directory = <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">cleanpath</span>.<span style="color:#9900CC;">to_s</span>.<span style="color:#9900CC;">capitalize</span>!
base_directory = base_directory.<span style="color:#9900CC;">cleanpath</span>.<span style="color:#9900CC;">to_s</span>.<span style="color:#9900CC;">capitalize</span>!</pre></div></div>

</pre>
<p>I added the <strong>capitalize!</strong> keyword at the end of the two lines so that both the paths are in uppercase, so that later in the code (line 708-710) shown below does not barf and give us the error we got shown in the first para. of the article.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">if</span> dest_prefix != base_prefix
<span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#CC00FF; font-weight:bold;">ArgumentError</span>, <span style="color:#996600;">&quot;different prefix: #{dest_prefix.inspect} and #{base_directory.inspect}&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>The temporary solution works after the patch. Hope it helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://rails.webintellix.com/2010/05/27/error-in-ruby-relative_path_from-call-on-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rails Magazine releases Issue #4 in print edition</title>
		<link>http://rails.webintellix.com/2009/08/31/rails-magazine-releases-issue-4-in-print-edition/</link>
		<comments>http://rails.webintellix.com/2009/08/31/rails-magazine-releases-issue-4-in-print-edition/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 22:33:00 +0000</pubDate>
		<dc:creator>Rupak Ganguly</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[rails magazine]]></category>
		<category><![CDATA[interviews]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[RubyKaigi 2009]]></category>

		<guid isPermaLink="false">http://rails.webintellix.com/index.php/2009/08/rails-magazine-releases-issue-4-in-print-edition/</guid>
		<description><![CDATA[ Dubbed as “Future of Rails”, Rails Magazine released Issue #4 in print. You can download the print edition from here. This issue brings 32-pages, filled with exclusive RubyKaigi 2009 conference coverage, in-depth articles, interviews with David Heinemeier Hansson, Matz, Yehuda Katz, Tom Enebo and Koichi Sasada.
The RubyKaigi 2009 coverage provides a nice roundup about [...]]]></description>
			<content:encoded><![CDATA[<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F&amp;title=Rails+Magazine+releases+Issue+%234+in+print+edition" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F&amp;title=Rails+Magazine+releases+Issue+%234+in+print+edition" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F&amp;title=Rails+Magazine+releases+Issue+%234+in+print+edition" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F&amp;headline=Rails+Magazine+releases+Issue+%234+in+print+edition" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Rails+Magazine+releases+Issue+%234+in+print+edition&amp;url=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Rails+Magazine+releases+Issue+%234+in+print+edition&amp;u=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Rails+Magazine+releases+Issue+%234+in+print+edition&amp;url=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Rails+Magazine+releases+Issue+%234+in+print+edition&amp;url=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Rails+Magazine+releases+Issue+%234+in+print+edition&amp;url=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F&amp;title=Rails+Magazine+releases+Issue+%234+in+print+edition&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Frails.webintellix.com%2F2009%2F08%2F31%2Frails-magazine-releases-issue-4-in-print-edition%2F" ><img class="lightsocial_img" src="http://rails.webintellix.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><p><a href="http://www.railsmagazine.com/issues/4"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px; display: inline; border-top: 0px; border-right: 0px" title="railsmagazine-cover4" src="http://webintellix.com/blog_rails/wp-content/uploads/2009/08/railsmagazinecover4.png" border="0" alt="railsmagazine-cover4" width="188" height="244" align="right" /></a> Dubbed as “Future of Rails”, Rails Magazine released Issue #4 in print. You can download the print edition from <a href="http://www.railsmagazine.com/issues/4" target="_blank">here</a>. This issue brings 32-pages, filled with exclusive RubyKaigi 2009 conference coverage, in-depth articles, interviews with David Heinemeier Hansson, Matz, Yehuda Katz, Tom Enebo and Koichi Sasada.</p>
<p>The RubyKaigi 2009 coverage provides a nice roundup about the conference with articles, photos and session information. The interviews are great giving insights into Rails 3, Ruby 1.9 and JRuby. And, last but not the least, this issue also brings a wealth of knowledge via the fine articles on various topics.</p>
<p>I thoroughly enjoyed interviewing Yehuda Katz and Tom Enebo and I thank them both for their participation.</p>
<p>If you have any feedback, please do write to us or participate in the <a href="http://survey.railsmagazine.com" target="_blank">survey</a> to tells us what you want to read.</p>
<p>Please be on the lookout for the <strong>free downloadable digital version</strong> which will be released soon!</p>
<p><strong><span style="font-size: small;">Table of Contents</span>:</strong></p>
<p><em><a href="http://www.railsmagazine.com/articles/37">A Word From the Editor</a></em> by Olimpiu Metiu</p>
<p><em><a href="http://www.railsmagazine.com/articles/38">Background Processing with Delayed_Job</a></em> by James Harrison</p>
<p><em><a href="http://www.railsmagazine.com/articles/39">Generating PDF with ODF templates</a></em> by Rodrigo Rosenfeld Rosas</p>
<p><em><a href="http://www.railsmagazine.com/articles/40">Interview with Yehuda Katz</a></em> by Yehuda Katz and Rupak Ganguly</p>
<p><em><a href="http://www.railsmagazine.com/articles/41">Interview with David Heinemeier Hansson</a></em> by Mark Coates</p>
<p><em><a href="http://www.railsmagazine.com/articles/42">Feel the Radiance with Radiant CMS</a></em> by Saurabh Bhatia</p>
<p><em><a href="http://www.railsmagazine.com/articles/43">Interview with Thomas Enebo</a></em> by Thomas Enebo and Rupak Ganguly</p>
<p><em><a href="http://www.railsmagazine.com/articles/44">Oracle Tips and Tricks</a></em> by Greg Donald</p>
<p><em><a href="http://www.railsmagazine.com/articles/45">Ruby Kaigi Rails Magazine Exclusive Coverage</a></em> by Khaled al Habache</p>
<p><em><a href="http://www.railsmagazine.com/articles/46">RubyKaigi 2009 Roundup</a></em> by Ehab El-Badry</p>
<p><em><a href="http://www.railsmagazine.com/articles/47">Interview with Matz</a></em> by Yukihiro Matsumoto and Muhammad Ali</p>
<p><em><a href="http://www.railsmagazine.com/articles/48">Interview with Koichi Sasada</a></em> by Koichi Sasada and Muhammad Ali</p>
]]></content:encoded>
			<wfw:commentRss>http://rails.webintellix.com/2009/08/31/rails-magazine-releases-issue-4-in-print-edition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
