Execute Ruby code in sublime text 2

后端 未结 5 1450
栀梦
栀梦 2020-12-15 03:40

How can I run a Ruby file with ST2 and see the ouput? I thought I should use the build command. But if I have this:

def foobar
  \"hello world\"
end

puts fo         


        
5条回答
  •  北海茫月
    2020-12-15 03:42

    enter control + ` (key close to number 1 in keyboard so it will open new window bottom of sublime text, where you can enter ruby code and see result), but make sure you have install ruby correctly and set your path from terminal

提交回复
热议问题