Re: ruby-select problem - Sonoma

2023-10-21 Thread Chris F
No Ryan, I didn't switch from zsh to bash as any user - after migration 
of users and apps, and my moving from a temporary user to my usual one, 
Terminal came up in bash with the usual zsh entreaty, and I left things 
that way. This was all a few hours before starting a "clean" install of 
MacPorts (from my usual user, using bash).


So the Macports install was from bash, and that session had picked up a 
.bash_profile dated 3 years ago which had no less than 3 
Macports-generated exports of PATH inserting the /opt/local/... stuff. 
And there were three .bash_profile.macports-saved files.


I've looked at the backups of those days and the day following my 
install of Macports there was no sign that anything had modified 
.bash_profile recently, nor was there a telltale 
.bash_profile.macports-saved... for any recent date. So I guess the 
MacPort installer post-flite did not detect the need to add the export 
of a modified PATH. (But then, maybe that part of the installer has been 
modified since I last used it, and won't attempt to add an unnecessary 
export PATH if there are suitable ones already there)


I can't see that it is relevant, but I did have a problem with my second 
port install, ImageMagick, which failed at Python311 because I had 
forgotten to remove /Applications/Macports - see #68494. I fixed that 
and completed the install of ImageMagick before starting on installing 
ruby31 (which installed without problems).




Chris F





On 22/10/23 7:12 am, Ryan Schmidt wrote:

On Oct 20, 2023, at 19:44, Chris F wrote:

I have created an appropriate .bash_profile (as described in the Guide) and 
everything appears normal now.

You are using bash on Sonoma? The default shell is zsh. The MacPorts installer 
is supposed to detect which shell you use and configure the appropriate shell 
startup file but maybe it's not identifying your shell properly. Of course, if 
you changed your shell from zsh to bash after installing MacPorts that would 
explain it.




Re: ruby-select problem - Sonoma

2023-10-21 Thread Ryan Schmidt
On Oct 20, 2023, at 19:44, Chris F wrote:
> 
> I have created an appropriate .bash_profile (as described in the Guide) and 
> everything appears normal now.

You are using bash on Sonoma? The default shell is zsh. The MacPorts installer 
is supposed to detect which shell you use and configure the appropriate shell 
startup file but maybe it's not identifying your shell properly. Of course, if 
you changed your shell from zsh to bash after installing MacPorts that would 
explain it. 

Re: ruby-select problem - Sonoma

2023-10-20 Thread Chris F
Thanks Bill, Chris - I have created an appropriate .bash_profile (as 
described in the Guide) and everything appears normal now.


I've searched back to the time when Migration Assistant restored my user 
directory. That .bash_profile had several comments made at the time(s) 
that MacPorts install post-flight added and export of an amended PATH, 
but I couldn't find a comment that corresponded to my most  recent 
Macports install (which was shortly after finishing with Migration 
Assistant). However, that absence could have been due to the timing of 
backups. In any case, the restored .bash_profile should have worked just 
fine, so I'm at a loss to know how my  .bash_profile became "corrupted" 
post restoration.


Never mind - all good now. Thanks again.

Chris F





On 20 Oct 2023, at 6:13 pm, Bill 
Cole  wrote:

On 2023-10-19 at 18:47:01 UTC-0400 (Fri, 20 Oct 2023 11:47:01 +1300)
Chris F
is rumored to have said:


On 20/10/23 11:17 am, Chris Jones wrote:



On 19 Oct 2023, at 10:58 pm, Chris F  wrote:



I've just migrated to Sonoma 14.0 via a clean OS install plus Migration 
Assistant and I'm now reinstalling my ports one at a time.

Port ruby31 installed without problems but ruby-select doesn't seem to work/be effective 
- after ruby-select ruby31 runs successfully, command "ruby" still starts the 
OS default ruby 2.6.10

I've checked /opt/local/bin/ruby and it points (correctly?) to ruby3.1.

Any advice would be appreciated.


Did you start a new terminal session after run port select for ruby ?

Yes I did, Chris - I shut terminal down and restarted it a couple of times as 
well.  Chris F

Check the order of directories in your $PATH environment variable. If the 
sub-directories under /usr are listed before those under /opt/local, you will 
use the base install executables instead oF those installed by MacPorts.

Exactly. If once you have started a fresh terminal

  > which ruby

Doesn’t list the macports provided one, the issue is your personal PATH is not 
set correctly.

Chris




--
Bill Cole
b...@scconsult.com  orbillc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire




Re: ruby-select problem - Sonoma

2023-10-20 Thread Chris Jones



> On 20 Oct 2023, at 6:13 pm, Bill Cole 
>  wrote:
> 
> On 2023-10-19 at 18:47:01 UTC-0400 (Fri, 20 Oct 2023 11:47:01 +1300)
> Chris F 
> is rumored to have said:
> 
>>> On 20/10/23 11:17 am, Chris Jones wrote:
>>> 
>>> 
 On 19 Oct 2023, at 10:58 pm, Chris F  wrote:
 
 
 
 I've just migrated to Sonoma 14.0 via a clean OS install plus Migration 
 Assistant and I'm now reinstalling my ports one at a time.
 
 Port ruby31 installed without problems but ruby-select doesn't seem to 
 work/be effective - after ruby-select ruby31 runs successfully, command 
 "ruby" still starts the OS default ruby 2.6.10
 
 I've checked /opt/local/bin/ruby and it points (correctly?) to ruby3.1.
 
 Any advice would be appreciated.
 
>>> Did you start a new terminal session after run port select for ruby ?
>> 
>> Yes I did, Chris - I shut terminal down and restarted it a couple of times 
>> as well.  Chris F
> 
> Check the order of directories in your $PATH environment variable. If the 
> sub-directories under /usr are listed before those under /opt/local, you will 
> use the base install executables instead oF those installed by MacPorts.

Exactly. If once you have started a fresh terminal 

 > which ruby

Doesn’t list the macports provided one, the issue is your personal PATH is not 
set correctly.

Chris

> 
> 
> 
> --
> Bill Cole
> b...@scconsult.com or billc...@apache.org
> (AKA @grumpybozo and many *@billmail.scconsult.com addresses)
> Not Currently Available For Hire


Re: ruby-select problem - Sonoma

2023-10-20 Thread Bill Cole

On 2023-10-19 at 18:47:01 UTC-0400 (Fri, 20 Oct 2023 11:47:01 +1300)
Chris F 
is rumored to have said:


On 20/10/23 11:17 am, Chris Jones wrote:




On 19 Oct 2023, at 10:58 pm, Chris F  wrote:



I've just migrated to Sonoma 14.0 via a clean OS install plus 
Migration Assistant and I'm now reinstalling my ports one at a time.


Port ruby31 installed without problems but ruby-select doesn't seem 
to work/be effective - after ruby-select ruby31 runs successfully, 
command "ruby" still starts the OS default ruby 2.6.10


I've checked /opt/local/bin/ruby and it points (correctly?) to 
ruby3.1.


Any advice would be appreciated.


Did you start a new terminal session after run port select for ruby ?


Yes I did, Chris - I shut terminal down and restarted it a couple of 
times as well.  Chris F


Check the order of directories in your $PATH environment variable. If 
the sub-directories under /usr are listed before those under /opt/local, 
you will use the base install executables instead oF those installed by 
MacPorts.




--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire


Re: ruby-select problem - Sonoma

2023-10-19 Thread Chris F

On 20/10/23 11:17 am, Chris Jones wrote:




On 19 Oct 2023, at 10:58 pm, Chris F  wrote:



I've just migrated to Sonoma 14.0 via a clean OS install plus 
Migration Assistant and I'm now reinstalling my ports one at a time.


Port ruby31 installed without problems but ruby-select doesn't seem 
to work/be effective - after ruby-select ruby31 runs successfully, 
command "ruby" still starts the OS default ruby 2.6.10


I've checked /opt/local/bin/ruby and it points (correctly?) to ruby3.1.

Any advice would be appreciated.


Did you start a new terminal session after run port select for ruby ?


Yes I did, Chris - I shut terminal down and restarted it a couple of 
times as well.  Chris F






Chris F

Ruby Bay, New Zealand





Re: ruby-select problem - Sonoma

2023-10-19 Thread Chris Jones


> On 19 Oct 2023, at 10:58 pm, Chris F  wrote:
> 
> 
> I've just migrated to Sonoma 14.0 via a clean OS install plus Migration 
> Assistant and I'm now reinstalling my ports one at a time. 
> 
> Port ruby31 installed without problems but ruby-select doesn't seem to 
> work/be effective - after ruby-select ruby31 runs successfully, command 
> "ruby" still starts the OS default ruby 2.6.10
> 
> I've checked  /opt/local/bin/ruby and it points (correctly?) to ruby3.1.
> 
> Any advice would be appreciated.
> 
Did you start a new terminal session after run port select for ruby ?

> 
> Chris F
> 
> Ruby Bay, New Zealand
> 
> 
> 
>