Terminal not executing Ruby files

后端 未结 4 2029
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-11 06:24

I\'m pretty much entirely new to programming, so bear with me. I am on a Macbook Pro running 10.6.6.

At the beginning of the \"Learn to Program\" tutorial are these dir

4条回答
  •  半阙折子戏
    2021-02-11 06:52

    In Terminal, did you change your current directory to your desktop before running your program ?

    If your program is stored on your desktop, you first need to change directory to your desktop or your Ruby script will not be found.

    $ cd Desktop
    $ ruby calc.rb
    

提交回复
热议问题