title: Ruby relative_path_from call on Windows
body: <p>I'm running into an issue with the portion of the Rails generation script that searches the plugin path for appropriately named files to find generators. On one of my systems, I have Ruby installed in <code>c:\dev\ruby</code> and have my project directory at <code>d:\local\projects</code></p>
  
  <p>The Ruby <code>Pathname#relative_path_from</code> method (which is called by the Rails generator script) chokes on this configuration when it attempts to find the relative path between <code>c:\</code> and <code>d:\</code>...</p>
  
  <p>Has anyone run into this situation with <code>relative_path_from</code> and multiple drives on Windows? Is there a workaround for the rails generator script?</p>
  
  <p>Here's a sample from IRB:</p>
  
  <pre><code>&gt;&gt; x = Pathname.new('c:/dev/ruby')
  =&gt; #&lt;Pathname:c:/dev/ruby&gt;
  &gt;&gt; y = Pathname.new('d:/local/projects')
  =&gt; #&lt;Pathname:d:/local/projects&gt;
  &gt;&gt; x.relative_path_from(y)
  ArgumentError: different prefix: "c:/" and "d:/local/projects"
          from c:/dev/ruby/lib/ruby/1.8/pathname.rb:709:in `relative_path_from'
          from (irb)...
  </code></pre>
  
  <p>If there's no solution, I could always make sure my Ruby install and project directories are on the same drive, but that would prevent me from ever working off a project directory on a pendrive...</p>
  
  <p><strong>UPDATE:</strong> Turns out the issue is related specifically to some modification that the Radiant CMS makes to the Rails configuration variables. This change adds additional plugin directories to the project, some of which can cross drive boundaries. Since the Rails generator code doesn't expect that sort of drive-jumping, the generator breaks on my computer...</p>