Maxim:

in this instance I’d suggest `rbenv` and `rbenv install` (best installed directly) here: https://github.com/rbenv/rbenv.

if you want to stick with macports’ ruby, `sudo port select ruby` will switch versions systemwide. `rbenv`, however, can use different rubies per folder and will manage the gems etc in the `~/.rbenv` folder (or wherever you install it).

You can also switch to just setting some variables in your shell configuration and specifying where you want ruby to install things. Scroll down to the ruby section here: https://wiki.archlinux.org/title/XDG_Base_Directory#Supported.

best,

ak

On 2022-12-16 (KW 50) at 05:29:42 (-0600) Maxim Abalenkov wrote:

Dear all,

How are you? I hope all is well with you. I need help please. Can you please guide me, on how to use and manage multiple Ruby installations with MacPorts? I use Ruby primarily for static website generation with Jekyll. But every time a new Ruby version comes it, it is a little bit of a guesswork to make Jekyll work again. I thought I would ask the experts here.

Issuing the `port search ruby` command I see `chruby, ruby31, ruby_select, rb-bundler` which should all be helpful for me. But how do I use them in an elegant way, switching between existing Ruby versions?

I remember following the official Jekyll installation guide: https://jekyllrb.com/docs/installation/macos/ <https://jekyllrb.com/docs/installation/macos/> But I don’t like, that `ruby-install` installs everything, Ruby and gems, into my home directory. This is not the place for installation files.

Thank you for your help and have a wonderful day ahead!

—
Best wishes,
Maxim

Maxim Abalenkov \\ maxim.abalen...@gmail.com
+44 7 486 486 505 \\ www.maxim.abalenkov.uk


Reply via email to