https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112011-07-25T20:06:30ZRuby Issue Tracking SystemRuby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=196522011-07-25T20:06:30Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>drbrain (Eric Hodel)</i></li><li><strong>Target version</strong> set to <i>2.0.0</i></li></ul> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=196872011-07-26T08:50:21Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Since I committed r32608 and r32611 I think this issue is now invalid.</p>
<p>If a different version of rake or rdoc are installed they will behave the same as the bundled library. rake <em>0.9.2.1</em> will load the built-in version of rake, for example. If a newer version of RDoc were installed rdoc and ri would behave the same.</p>
<p>I'm closing this ticket unless differing behavior can be reproduced.</p> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=273282012-06-21T14:34:46Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li></ul><p>Sorry, I'm reopening, but the issue is still present.</p>
<p>When you install Ruby, it carries initial version of /usr/bin/rdoc [1] (I picked up the RDoc as an example, but it is valid also for Rake, etc). Now let's assume that you will install updated RDoc, which replaces the file with the typical RubyGems stub, something like:</p>
<pre><code>$ cat /usr/bin/rdoc
#!/usr/bin/ruby
#
# This file was generated by RubyGems.
#
# The application 'rdoc' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0"
if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/
version = $1
ARGV.shift
end
end
gem 'rdoc', version
load Gem.bin_path('rdoc', 'rdoc', version)
</code></pre>
<p>Now, this is problem for packaging systems, namely RPM (but I would be surprised if that is not issue for DEB as well). If you will do monolithic Ruby package, which provides /usr/bin/rdoc and later you want to package independent updated version of RDoc gem, which provides /usr/bin/rdoc as well, you are in conflict, since the files are different. If they would be the same (and there is no reason to be different IMO), there would be no conflict. The file would be own by two packages in parallel, which is supported scenario.</p>
<p>So what I'd like to see is the RubyGems stub in /usr/bin, especially after you committed r32608.</p>
<p>Actually, I'm trying to put together some proposal to solve <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Gemifying Ruby standard library (Closed)" href="https://redmine.ruby-lang.org/issues/5481">#5481</a> and <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: remove the "spec-only gems" in Ruby 1.9.3 (was What is the purpose of "fake" gems in Ruby) (Closed)" href="https://redmine.ruby-lang.org/issues/6124">#6124</a>, which might fix also this issue.</p>
<p>Thank you.</p>
<p>[1] <a href="https://github.com/ruby/ruby/blob/trunk/bin/rdoc" class="external">https://github.com/ruby/ruby/blob/trunk/bin/rdoc</a></p> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=364132013-02-17T17:35:50Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Target version</strong> changed from <i>2.0.0</i> to <i>2.6</i></li></ul><p>This is too risky to fix for 2.0.0, sorry I did not have time.</p> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=424482013-10-14T22:20:01Zsalimane (Salimane Adjao Moustapha)me@salimane.com
<ul></ul><p>drbrain (Eric Hodel) wrote:</p>
<blockquote>
<p>This is too risky to fix for 2.0.0, sorry I did not have time.<br>
I would like to know when this issue can be solved and pushed into trunk at least :)<br>
Thanks</p>
</blockquote> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=682402017-12-08T14:12:17Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Assignee</strong> changed from <i>drbrain (Eric Hodel)</i> to <i>hsbt (Hiroshi SHIBATA)</i></li></ul><p>@hsbt-san, I might be wrong but has this issue been solved by default/bundled gems?</p> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=683432017-12-12T14:54:39Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>No, this is still not resolved (testing with r61169). Only Rake (which is "bundled" gem) appears to have RubyGems generated stub which won't conflict unless RubyGems change the algorithm. The remaining executables (namely bundle, bundler, rdoc) are conflicting.</p> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=683542017-12-13T01:55:29Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul></ul><p>I understood this issue. I try to resolve current specification at Ruby 2.6.</p> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=687002017-12-25T18:15:00Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Target version</strong> deleted (<del><i>2.6</i></del>)</li></ul> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=751002018-11-23T02:13:19Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul></ul><p>I created a patch for fixing this.</p>
<p><a href="https://github.com/ruby/ruby/pull/2023" class="external">https://github.com/ruby/ruby/pull/2023</a></p>
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/4">@nobu (Nobuyoshi Nakada)</a> Can you review the above patch?</p> Ruby master - Bug #5060: Executables in bin folder conflict with their gem versions.https://redmine.ruby-lang.org/issues/5060?journal_id=751612018-11-25T01:20:09Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Applied in changeset trunk|r65963.</p>
<hr>
<p>Use stub executables generated by RubyGems istead of original executables.<br>
It resolved the conflict issues when invoking <code>gem i rdoc</code> and the binstub<br>
issues with Bundler and Rails.</p>
<p>[Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Executables in bin folder conflict with their gem versions. (Closed)" href="https://redmine.ruby-lang.org/issues/5060">#5060</a>]<a href="/issues/5060">[ruby-core:38257]</a>[Fix GH-2023]</p>
<ul>
<li><a href="https://github.com/rubygems/rubygems/pull/2338" class="external">https://github.com/rubygems/rubygems/pull/2338</a></li>
<li><a href="https://github.com/heroku/heroku-buildpack-ruby/issues/829" class="external">https://github.com/heroku/heroku-buildpack-ruby/issues/829</a></li>
</ul>