Terminal not executing Ruby files

后端 未结 4 1954
佛祖请我去吃肉
佛祖请我去吃肉 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:50

    ruby 1.9.3p0 (2011-10-30) [i386-mingw32]

    C:\Ruby Programs>ruby calc.rb

    ruby: No such file or directory -- calc.rb (LoadError)

    C:\Ruby Programs>ruby calc.rb.txt

    3

    One should not have to add the .txt extension while attempting to run the program from whithin the program's home folder. I have to though.

提交回复
热议问题