Updated Ubuntu bundler broken due to ruby thor dependency explanation and workaround (markdown)

ghost-from-the-past 2021-04-14 14:08:56 +02:00
parent 64c75fe9a1
commit 3839350b1b

@ -1,16 +1,14 @@
<p>As explained here</p>
<p>
<a href="https://bugs.launchpad.net/ubuntu/+source/ruby-thor/+bug/1885424">https://bugs.launchpad.net/ubuntu/+source/ruby-thor/+bug/1885424</a>
<p>If when you run bundler you get and error saying "TypeError: superclass mismatch for class Command", this is due to the problem explained in this link <a href="https://bugs.launchpad.net/ubuntu/+source/ruby-thor/+bug/1885424">https://bugs.launchpad.net/ubuntu/+source/ruby-thor/+bug/1885424</a>
</p>
<p>This happens for the Ubuntu and Debian distributions.The problem is in their fork of bundler not in the original upstream version at <a href="https://github.com/rubygems/rubygems">https://github.com/rubygems/rubygems</a></p>
<p>The files involved are:</p>
<p>/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/vendored_molinillo.rb</p>
<p>/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/vendored_thor.rb</p>
<p>
<br/>
</p>
<p>the following change on the files has broken their magic...</p>
<p>the following changes on the files had broken their magic...</p>
<p>-----------------------------------------------------------------------------</p>
<p>/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/vendored_molinillo.rb</p>
<p>
<br/>
</p>
<p>--- a/lib/bundler/vendored_molinillo.rb</p>
<p>+++ b/lib/bundler/vendored_molinillo.rb</p>
<p>@@ -1,4 +1,4 @@</p>
@ -25,13 +23,6 @@
<br/>
</p>
<p>-----------------------------------------------------------------------------</p>
<p>/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/vendored_thor.rb</p>
<p>
<br/>
</p>
<p>
<br/>
</p>
<p>--- a/lib/bundler/vendored_thor.rb</p>
<p>+++ b/lib/bundler/vendored_thor.rb</p>
<p>@@ -2,7 +2,7 @@</p>
@ -47,12 +38,11 @@
<p>-require_relative "vendor/thor/lib/thor"</p>
<p>+require "thor"</p>
<p>-----------------------------------------------------------------------------</p>
<p>you can revert the changes or the files from the master branch of github <span class="nolink"> <span class="nolink"> <span class="nolink"> <a href="https://github.com/rubygems/rubygems">https://github.com/rubygems/rubygems</a> </span> </span> </span>
</p>
<p>
<span class="nolink"> </span>also you need to copy from the master branch the directories</p>
<p>vendor/thor and vendor/molinillo</p>
<p>
<span class="nolink">into the <span class="nolink">directory</span> /usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/vendor <br/> </span>
<br/>
</p>
<p>------------</p>
<p>you can revert the changes or copy the files from the upstream master branch <a href="https://github.com/rubygems/rubygems">https://github.com/rubygems/rubygems</a>
</p>
<p>Once the modifications done, the files will refer to the relative /vendor/molinillo and /vendor/thor directories that were removed in the fork of Ubuntu/Debian so you need to copy both directories from the upstream into </p>
<p>/usr/share/rubygems-integration/all/gems/bundler-2.1.4/lib/bundler/vendor</p>
<p>You can run now bundler with its magic restored :)</p>