uh, you need to learn more about the terminal and commands...this is unrelated to ruby. Pay attention to your prompt, as it tells you
where you are. Consider making a custom colorful prompt to clearly
show what directory you are in. Of course all the commands targeting
*.rb files stopped working after you Changed Directory (cd) into
mystuff...
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 inthe 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 youcan 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$ ruby ex1.rb
ruby: No such file or directory -- ex1.rb (LoadError) CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 286 |
Nodes: | 16 (3 / 13) |
Uptime: | 86:26:43 |
Calls: | 6,496 |
Calls today: | 7 |
Files: | 12,099 |
Messages: | 5,277,030 |