<div>Hi everyone,<div><br></div><div>First time I&#39;m posting to this list, so here&#39;s hoping I&#39;m not saying anything stupid and this post can be of some actual use to someone.</div><div><br></div><div>It seems like the ~&gt; is some special syntax that was developed especially for rubygems (can be seen at <a href="http://rubygems.rubyforge.org/svn/trunk/lib/rubygems/requirement.rb" target="_blank">http://rubygems.rubyforge.org/svn/trunk/lib/rubygems/requirement.rb</a> ). It implies, quote-unquote:</div>


<div><br></div><div><span style="font-family:monospace;font-size:medium;white-space:pre-wrap">lambda { |v, r| v = v.release; v &gt;= r &amp;&amp; v &lt; r.bump } </span></div><div><font face="monospace"><span style="white-space:pre-wrap;font-size:medium"><span class="Apple-style-span" style="font-family: arial; white-space: normal; font-size: small; "><br>

</span></span></font></div><div><font face="monospace"><span style="white-space:pre-wrap;font-size:medium"><span class="Apple-style-span" style="font-family: arial; white-space: normal; font-size: small; ">where both v and r are Gem::Version objects (the required version and the version present on the system, respectively). What seems to be happening is that v (which is &quot;1.1.0&quot;) does not satisfy a requirement of &quot;~&gt; r&quot; (where r = &quot;1.0.1&quot;). I don&#39;t have the correct stack available here (my outdated version of rubygems doesn&#39;t seem to support the &quot;release&quot; method), but after playing around in irb (use &#39;require &quot;rubygems&quot;&#39; if you want to reproduce) for a bit, what I think happens here is this:</span></span></font></div>


<div><ul><li>v = v.release (=&gt; v is now &quot;1.1.0&quot;, since this was not a prerelease, this returns itself)</li><li>therefore, &quot;v &gt;= r&quot; is the same as &quot;1.1.0 &gt;= 1.0.1&quot; (this would be likely to succeed)</li>


<li>and &quot;v &lt; r.bump&quot; is the same as Gem::Version.new(&quot;1.1.0&quot;) &gt;= Gem::Version.new(&quot;1.0.1&quot;).bump </li></ul></div><div>Now the last line seems to be where things go haywire. &quot;bump&quot;ing 1.0.1 results in 1.1 and therefore, this line says &quot;1.1.0 &lt; 1.1&quot;</div>


<div><br></div><div>The question then is, why is this gem specced like this? It seems that &quot;~&gt;&quot; means &quot;some version from the same major.minor range (teeny doesn&#39;t matter) and not higher than that.&quot; Altering the gemspec may help but may, of course, hurt as well. Some information on why the gem has these requirements would be very useful in determining the approach to this problem.</div>


<div><br></div><div>I hope this information can be useful to someone. </div><div><br></div><div>Regards,</div><div>Rene van den Berg</div><div><br></div><div><div class="gmail_quote">On Wed, Feb 24, 2010 at 12:14 AM, Jeroen van Meeuwen <span dir="ltr">&lt;<a href="mailto:kanarip@kanarip.com" target="_blank">kanarip@kanarip.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<div><br>On Tue, 23 Feb 2010 17:29:56 -0500, Alejandro Perez<br>&lt;<a href="mailto:alejandro.perez.torres@gmail.com" target="_blank">alejandro.perez.torres@gmail.com</a>&gt; wrote:<br>&gt; Jason,<br>&gt;<br>&gt;     Can you send the listo of gems you have installed. I work ruby apps<br>


&gt; and rails, but i normally compile my ruby version on Fedora, seems to me<br>&gt; that you installation update the rack version and eliminate the old one,<br>&gt; so now you do not have rack 1.0.0 and you application is looking for<br>


&gt; that version or you do not have the gems version specified on the<br>&gt; enviroment.rb file of you application. For instance on my machine gem<br>&gt; list provide this line rack (1.1.0, 1.0.1) that mean i have installed<br>


&gt; the two version of rack.<br>&gt;<br>&gt; hope this help.<br>&gt;<br><br></div>If you use &quot;gem install&quot; and &quot;gem update&quot;, yes you can have multiple<br>versions of one gem. However, when using the Fedora provided RPM packages,<br>


only one version of the package will be installed, inherently removing the<br>old version of the gem.<br><div><div></div><div><br>-- Jeroen<br><br>_______________________________________________<br>ruby-sig mailing list<br>


<a href="mailto:ruby-sig@lists.fedoraproject.org" target="_blank">ruby-sig@lists.fedoraproject.org</a><br><a href="https://admin.fedoraproject.org/mailman/listinfo/ruby-sig" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/ruby-sig</a><br>


</div><div><br></div></div></blockquote></div></div></div>