Add the brew ruby 3.0.1 to the shell configuration

After running brew install ruby, Homebrew installed Ruby 3.0.1.

As per the Jekyll installation docs, that step is followed by the following command:

# If you're using Zsh
echo 'export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"' >> ~/.zshrc

# If you're using Bash
echo 'export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"' >> ~/.bash_profile

However, I noticed the command points to the 3.0.0 path. If I run the command as shown above (in my case with zsh), there are no errors. Also, if I change the path to 3.0.1, I still do not receive an error.

My question is do I change 3.0.0 to 3.0.1 because the Jekyll docs are out of date or is 3.0.0 just fine so long as I am running Ruby 3.x?

Thank you.

I believe the gem path is only updated when the major or minor version changes, but not when the patch version changes (a version number being: major . minor . patch). So you shouldn’t need to change the /usr/local/lib/ruby/gems/3.0.0/bin path until you upgrade to 3.1.x.

Okay, cool, thanks! I’ll get it set up this week just to verify there aren’t any problems and let you know.

No issue here.

I upgraded Ruby 2.7 from say 2.7.2 to 2.7.3 and the path is still 2.7.0

So it will be the same for 3.0.0

I suppose the directory should just omit the last zero as it means nothing, but anyway