Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我安装了 rvm 和 ruby 版本 1.9.2。我有 Mac OS X 10.7。为什么看跌期权没有得到认可?puts ('Hello Ruby') zsh: 正确的 'puts' 到 'tput' [nyae]?
谢谢!
看起来您想直接在 shell 提示符下输入 Ruby 代码,但这是行不通的。尝试ruby -e "puts('Hello Ruby')"然后开始学习如何编写实际的 Ruby 程序,例如使用 Chris Pine 的“Learn to Program”:
ruby -e "puts('Hello Ruby')"
http://pine.fm/LearnToProgram/