LearnRubyTheHardWay Exercise 25

I’m not sure why this is the case but I sometimes keep getting the same message “ruby: No such file or directory – ex25.rb (LoadError)” or "ruby: No such file or directory – ex24.rb (LoadError)"even though I have followed exactly the same steps given in the instruction manual. For example, i could get exercise 24 to work properly for a few times, but then later on when I typed it in again, it doesn’t work. I couldn’t get ex25. to work though. I have attached my Terminal input and output expressions here. Its weird, as you can see sometimes ex24 works, sometimes it gives the error message even though i do exactly the same thing …

CaiGengYangs-MacBook-Pro:~ CaiGengYang$ mkdir mystuff
mkdir: mystuff: File exists
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ cd mystuff
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex1.rb
Hello World!
Hello Again
I like typing this.
This is fun.
Yay! Printing.
I’d much rather you ‘not’.
I “said” do not touch this.
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex25.rb
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex24.rb
Let’s practice everything.
You’d need to know 'bout escapes with \ that do \n newlines and \t tabs.

The lovely world

with logic so firmly planted
cannot discern
the needs of love
nor comprehend passion from intuition
and requires an explanation

	where there is none.

This should be five: 5
With a starting point of: 10000
We’d have 5000000 beans, 5000 jars, and 50 crates.
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex25.rb
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex25.rb
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex24.rb
Let’s practice everything.
You’d need to know 'bout escapes with \ that do \n newlines and \t tabs.

The lovely world

with logic so firmly planted
cannot discern
the needs of love
nor comprehend passion from intuition
and requires an explanation

	where there is none.

This should be five: 5
With a starting point of: 10000
We’d have 5000000 beans, 5000 jars, and 50 crates.
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex25.rb
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex25.rb
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ mkdir mystuff
mkdir: mystuff: File exists
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ cd mystuff
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex25.rb
ruby: No such file or directory – ex25.rb (LoadError)
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex24.rb
ruby: No such file or directory – ex24.rb (LoadError)
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex24.rb
ruby: No such file or directory – ex24.rb (LoadError)
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ mkdir mystuff
mkdir: mystuff: File exists
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ cd mystuff
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex24.rb
ruby: No such file or directory – ex24.rb (LoadError)
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$ ruby ex25.rb
ruby: No such file or directory – ex25.rb (LoadError)
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$

#Terminal Tutorial - Part I: Basic Commands and Concepts

1 Like