Hello,
So I am going through Michael Hartl’s “Learn Ruby The Hard Way”, managed to complete exercise 0 successfully , learned how to install a text editor , run the text editor and run the Terminal.
Currently, I am stuck on Exercise 1 -----------------------------------------------------------------------------
I typed the following text into a single TextWrangler file named ex1.rb (created a folder in my home directory called ex1.rb and saved it) ---------------------------------------------------------------------------
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 tried to run the file in my Terminal, I got error messages though -----------------------------------
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rb
ruby: No such file or directory – ex1.rb (LoadError)
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rb
ruby: No such file or directory – ex1.rb (LoadError)
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rb
ruby: No such file or directory – ex1.rb (LoadError)
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rb
ruby: No such file or directory – ex1.rb (LoadError)
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rb
ruby: No such file or directory – ex1.rb (LoadError)
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rb
ruby: Is a directory – ex1.rb (LoadError)
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rb
ruby: Is a directory – ex1.rb (LoadError)
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ex1.rb
-bash: ex1.rb: command not found
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rb
ruby: Is a directory – ex1.rb (LoadError)
CaiGengYangs-MacBook-Pro:~ CaiGengYang$
Doesn’t seem to work whatever I do … Any help appreciated , thanks alot.
Gengyang