How to execute a Ruby script in Terminal?

前端 未结 9 1624
南笙
南笙 2020-12-04 06:15

I\'ve set everything up that I need on my Mac (Ruby, Rails, Homebrew, Git, etc), and I\'ve even written a small program. Now, how do I execute it in Terminal? I wrote the pr

9条回答
  •  甜味超标
    2020-12-04 07:08

    Just invoke ruby XXXXX.rb in terminal, if the interpreter is in your $PATH variable.

    ( this can hardly be a rails thing, until you have it running. )

提交回复
热议问题