The mac comes with ruby 2.6.8. I need an older version (2.3.5). Ive installed home brew, and rbenv. Trying to get 2.3.5 installed it fails on tcl\tk. I cannot figure out where to get the libraries and how to get it installed.
Why does 2.3.5 require this, and the default version bundled with the mac doesn’t?
Of course if it is some weirdness about expecting the tcl/tk library to be present, you can install that:
brew install tcl-tk
And if nothing flies for the ARM64 side of things, open an x64 shell by installing Rosetta, and then install the x64 version of rbenv and probably things can come together.
Should report back /opt/homebrew/bin/brew, and if it doesn’t then something is fishy. If it is goofed up then it would be worth a try to first completely uninstall Homebrew:
I’ve had problems with these installs too. I have no idea if this is part of the problem, but rbenv isn’t the only option. I use chruby because it’s simpler. But there are other options.
Listing the rubies installed with the current one highlighted. This is an M1 MBA which I got about six months ago, just as the M2 was coming out but I couldn’t wait.
At present, Tcl/Tk8.6 is not supported. Although you can try to use Tcl/Tk8.6 with configure options, it will not work correctly. I recommend you to use Tcl/Tk8.5 or 8.4.
when I installed tcl-tk, it install version 8.6, not a working version for apple m2
can I specify which version I install using homebrew?
There is also the Rosetta option – in any Terminal window run this:
softwareupdate --install-rosetta
and then this x64 emulator is there to do your bidding! Pretty much any Intel thing can be done, and you have to install its own Homebrew and rbenv and so forth, but then Ruby 2.3.5 should be possible, and hopefully a bit more straightforward.
I do think that I’m close with the other though … have gotten 2.3.8 going …
Wow that is remarkable – I thought there was total compatibility between the M1 and M2. Maybe I’ve just got the wrong command line on this one or something.
What MacOS are you on? Here i am wondering about ZIPping up the already-installed 2.3.8 that I’ve got kicking around and sending it over to you.
And if you really need 2.3.5, which is mostly the same thing as 2.3.8 but without some security patches, then I can probably install that instead and send over instructions.
Should probably run either just fine or with minimal modification – it’s not until Ruby 2.7 that things transitioned a bit with the way that methods use keyword arguments. So on 2.6.x you’re free from hitting any of those snags.
Look out for any mention of trouble with “Fixnum” and “Bignum” – those are two numeric classes that got merged into being “Integer” in Ruby 2.4. There is a patch that I can provide for you if you end up hitting that snag.
ok, I’ve cloned my app to my desktop, and made some changes in my gemfile to reflect the system version of ruby (2.6.10).
Trying to bundle the application, but it’s been over an hour and it’s still resolving dependancies…
No fear on this – there’s also installing 2.6.10 using rbenv, and then doing the same. Things are well at this point!
Sometimes “resolving dependencies” hangs up because the network connection had a small snag. It’s OK to CTRL-C if it lets you, and then attempt another time.
Also good to run:
ps aux | grep bundle
And see what it reports – anything that’s using bundle should show in that list.