[prev in list] [next in list] [prev in thread] [next in thread] 

List:       macports-dev
Subject:    RE: ruby_select is broken
From:       Christopher Nielsen <mascguy () rochester ! rr ! com>
Date:       2021-10-03 14:08:42
Message-ID: 0EB17F59-7826-48E5-85AC-D3F5BC016386 () rochester ! rr ! com
[Download RAW message or body]

> The ruby_select portile just has:
> 
> destroot {
> 	select::install ruby ${filespath}/base
> 	select::install ruby ${filespath}/none
> }
> 
> which does not redirect the commands "ruby" or "gem" to the appropriate version \
> when you have installed the port "ruby27" for example. Instead, "which ruby" or \
> "which gem" always finds the Apple version of Ruby, which is now deprecated \
> according to the Catalina Release Notes…

Hmmm, it's working fine for me.

Starting from the default case, where nothing has been selected yet:

$ ll $(which ruby)
-r-xr-xr-x  1 root  wheel  restricted,compressed   51K Jul  9 18:40:13 2020 \
/usr/bin/ruby $ ll $(which gem)
-r-xr-xr-x  1 root  wheel  restricted,compressed  596B Jul 15 17:58:00 2017 \
/usr/bin/gem

After selecting ruby30:

$ sudo port select ruby ruby30
Selecting 'ruby30' for 'ruby' succeeded. 'ruby30' is now active.
$ ll $(which ruby)
lrwxr-xr-x  1 root  admin  -   22B Oct  3 09:54:35 2021 /opt/local/bin/ruby -> \
/opt/local/bin/ruby3.0 $ ll $(which gem)
lrwxr-xr-x  1 root  admin  -   21B Oct  3 09:54:35 2021 /opt/local/bin/gem -> \
/opt/local/bin/gem3.0

After selecting ruby27:

$ sudo port select ruby ruby27
Selecting 'ruby27' for 'ruby' succeeded. 'ruby27' is now active.
$ ll $(which ruby)
lrwxr-xr-x  1 root  admin  -   22B Oct  3 09:55:14 2021 /opt/local/bin/ruby -> \
/opt/local/bin/ruby2.7 $ ll $(which gem)
lrwxr-xr-x  1 root  admin  -   21B Oct  3 09:55:14 2021 /opt/local/bin/gem -> \
/opt/local/bin/gem2.7

And finally, after reverting back to no selection:

$ sudo port select ruby none
Selecting 'none' for 'ruby' succeeded. 'none' is now active.
$ ll $(which ruby)
-r-xr-xr-x  1 root  wheel  restricted,compressed   51K Jul  9 18:40:13 2020 \
/usr/bin/ruby $ ll $(which gem)
-r-xr-xr-x  1 root  wheel  restricted,compressed  596B Jul 15 17:58:00 2017 \
/usr/bin/gem

So this isn't working for you on macOS Catalina…?


[Attachment #3 (unknown)]

<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: \
after-white-space;" class=""><blockquote type="cite" class="">The ruby_select portile \
just has:<div class=""><br class="">    destroot {</div><div class=""><span \
class="Apple-tab-span" style="white-space:pre">	</span>select::install ruby \
${filespath}/base</div><div class=""><span class="Apple-tab-span" \
style="white-space:pre">	</span>select::install ruby ${filespath}/none</div><div \
class="">}</div><div class=""><br class="">which does not redirect the commands \
"ruby" or "gem" to the appropriate version when you have installed the port "ruby27" \
for example. Instead, "which ruby" or "which gem" always finds the Apple version of \
Ruby, which is now deprecated according to the Catalina Release \
Notes…</div></blockquote><div class=""><br class=""></div><div class="">Hmmm, it's \
working fine for me.</div><div class=""><br class=""></div><div class="">Starting \
from the default case, where nothing has been selected yet:</div><div class=""><br \
class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" \
class="">$ ll $(which ruby)</blockquote><blockquote style="margin: 0 0 0 40px; \
border: none; padding: 0px;" class=""><div class=""><div class="">-r-xr-xr-x &nbsp;1 \
root &nbsp;wheel &nbsp;restricted,compressed &nbsp; 51K Jul &nbsp;9 18:40:13 2020 \
/usr/bin/ruby</div></div><div class=""><div class="">$ ll $(which \
gem)</div></div><div class=""><div class="">-r-xr-xr-x &nbsp;1 root &nbsp;wheel \
&nbsp;restricted,compressed &nbsp;596B Jul 15 17:58:00 2017 \
/usr/bin/gem</div></div></blockquote><div class=""><br class=""></div><div \
class="">After selecting ruby30:</div><div class=""><br class=""></div><blockquote \
style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div \
class="">$ sudo port select ruby ruby30</div></div><div class=""><div \
class="">Selecting 'ruby30' for 'ruby' succeeded. 'ruby30' is now \
active.</div></div><div class=""><div class="">$ ll $(which ruby)</div></div><div \
class=""><div class="">lrwxr-xr-x &nbsp;1 root &nbsp;admin &nbsp;- &nbsp; 22B Oct \
&nbsp;3 09:54:35 2021 /opt/local/bin/ruby -&gt; \
/opt/local/bin/ruby3.0</div></div><div class=""><div class="">$ ll $(which \
gem)</div></div><div class=""><div class="">lrwxr-xr-x &nbsp;1 root &nbsp;admin \
&nbsp;- &nbsp; 21B Oct &nbsp;3 09:54:35 2021 /opt/local/bin/gem -&gt; \
/opt/local/bin/gem3.0</div></div></blockquote><div class=""><div class=""><br \
class=""></div><div class="">After selecting ruby27:</div><div class=""><br \
class=""></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: \
0px;" class=""><div class=""><div class="">$ sudo port select ruby \
ruby27</div></div><div class=""><div class="">Selecting 'ruby27' for 'ruby' \
succeeded. 'ruby27' is now active.</div></div><div class=""><div class="">$ ll \
$(which ruby)</div><div class="">lrwxr-xr-x &nbsp;1 root &nbsp;admin &nbsp;- &nbsp; \
22B Oct &nbsp;3 09:55:14 2021 /opt/local/bin/ruby -&gt; \
/opt/local/bin/ruby2.7</div></div><div class=""><div class="">$ ll $(which \
gem)</div></div><div class=""><div class="">lrwxr-xr-x &nbsp;1 root &nbsp;admin \
&nbsp;- &nbsp; 21B Oct &nbsp;3 09:55:14 2021 /opt/local/bin/gem -&gt; \
/opt/local/bin/gem2.7</div></div></blockquote><div class=""><div class=""><br \
class=""></div><div class="">And finally, after reverting back to no \
selection:</div><div class=""><br class=""></div></div><blockquote style="margin: 0 0 \
0 40px; border: none; padding: 0px;" class=""><div class=""><div class="">$ sudo port \
select ruby none</div></div><div class=""><div class="">Selecting 'none' for 'ruby' \
succeeded. 'none' is now active.</div></div></blockquote><div class=""><div \
class=""><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" \
class="">$ ll $(which ruby)</blockquote><blockquote style="margin: 0px 0px 0px 40px; \
border: none; padding: 0px;" class=""><div class="">-r-xr-xr-x &nbsp;1 root \
&nbsp;wheel &nbsp;restricted,compressed &nbsp; 51K Jul &nbsp;9 18:40:13 2020 \
/usr/bin/ruby</div><div class="">$ ll $(which gem)</div><div class="">-r-xr-xr-x \
&nbsp;1 root &nbsp;wheel &nbsp;restricted,compressed &nbsp;596B Jul 15 17:58:00 2017 \
/usr/bin/gem</div></blockquote><br class=""></div></div><div class="">So this isn't \
working for you on macOS Catalina…?</div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic