I have to code for a legacy project using Ruby 2.6.6. I am using M1 Mac and using asdf as my version manager. As soon as I tried

$ asdf install ruby 2.6.6

It threw out an error, which you can get it here, the system stored it in a log file. Then I remembered that I installed my previous Ruby 3.x using this tutorial from Drifting Ruby. What I need to do now was to specify that we need to use X86 architecture, and so I gave this command

$ arch -x86_64 asdf install ruby 2.6.6

And it worked like charm.