[Solved] Exercise 1 already problems

So I got learn Ruby the hard way and got started. I created my ex1.rb

puts “Hello World!”
puts “Hello Again”
puts “I like typing this.”
puts “This is fun.”
puts “Yay! Printing.”
puts “I’d much rather you ‘not’.”
puts ‘I “said” do not touch this.’

When I run in the terminal with command ruby ex1.rb there is no output. I then made the file executable just in case, but still no cigar. I hate to be stumped on the very first example but not sure what to do.


Never mind, I got it, I originally saved it the first time with no text in it… never saved it again after I wrote new content.

Note: Line 7 : puts ‘I “said” do not touch this.’ did not work for me… I had to change it to puts “I “said” do not touch this.”

Very classic mistake. I think like 30% of people do that. The trick next time is do this:

cat ex1.rb

If you run it and nothing changed, then just do that and you’ll see the file real quick.

1 Like
A free service run by Zed A. Shaw for learncodethehardway.org.