Search code examples
rubyvisual-studio-code

How do I execute a Ruby script using VSCode?


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?


Solution

  • You can use Coder Runner Extension.

    Once adding the extension you press Command + Shift + P and select run by language then choose ruby