I'm using MacOS and I have installed VSCode, Ruby, rubocop, Ruby Solargraph, and their gem dependencies.
Having done this, how do I now execute a Ruby script without using the Terminal panel within VSCode?
You can use Coder Runner Extension.
Once adding the extension you press Command + Shift + P
and select run by language
then choose ruby