I have rvm and ruby version 1.9.2 installed. I have Mac OS X 10.7. Why is puts not getting recognized?
puts (‘Hello Ruby’)
zsh: correct ‘puts’ to ‘tput’ [nyae]?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This looks like you want to enter the Ruby code directly at a shell prompt, which won’t work. Try
ruby -e "puts('Hello Ruby')"and then start to learn how to write actual Ruby programs, e.g. with Chris Pine’s “Learn to Program”:http://pine.fm/LearnToProgram/