I started trying to install some Ruby gems to preview a site using Jekyll: gem install jekyll bundler
. This didn't work because of an access error, so I used the command sudo gem install jekyll bundler
, which did work, but I later learned that I was using a pre-installed system Ruby on an M4 MacOS.
Realising my mistake, I have now followed this tutorial to install a Ruby version manager (chruby
) and reconfigure my setup with the latest version of Ruby (3.4.2
), which was successful. I have also configured my shell to default to that version of Ruby.
My question is, how do I clean up any mistakes made by accidentally using the system Ruby? I can see that neither jekyll
nor bundler
installed successfully, but a few things did, for example:
Successfully installed webrick-1.9.1
Successfully installed unicode-display_width-2.6.0
Successfully installed terminal-table-3.0.2
Successfully installed safe_yaml-1.0.5
How do I remove these from the system and reset the system Ruby back to its default state to avoid any issues down the line?