Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #7201
| Newsgroups | comp.lang.ruby |
|---|---|
| Date | 2016-04-05 05:59 -0700 |
| References | <8f153753-66be-4aec-ae67-ab3a0c23ca89@googlegroups.com> <m2mvp8te74.fsf@gmail.com> |
| Message-ID | <96e9bddc-4a0d-4717-b01a-48ffe12c7373@googlegroups.com> (permalink) |
| Subject | Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby |
| From | Cai Gengyang <gengyangcai@gmail.com> |
Actually, I just got it to work and successfully completed Exercise 0. My issue now is with the next one, Exercise 1 --- this time, I got stuck when I tried to run my file in the Terminal. I have attached my input and error messages here , any help appreciated ... thanks alot 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.rbruby: No such file or directory -- ex1.rb (LoadError)CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rbruby: No such file or directory -- ex1.rb (LoadError)CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rbruby: No such file or directory -- ex1.rb (LoadError)CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rbruby: No such file or directory -- ex1.rb (LoadError)CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rbruby: No such file or directory -- ex1.rb (LoadError)CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rbruby: Is a directory -- ex1.rb (LoadError)CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rbruby: Is a directory -- ex1.rb (LoadError)CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ex1.rb-bash: ex1.rb: command not foundCaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby ex1.rbruby: Is a directory -- ex1.rb (LoadError)CaiGengYangs-MacBook-Pro:~ CaiGengYang$ Doesn't seem to work whatever I do ... Any help appreciated , thanks alot. Gengyang [/quote] On Tuesday, April 5, 2016 at 8:47:36 PM UTC+8, Sebastian Christ wrote: > On 2016-04-04 3:59, Cai Gengyang <gengyangcai@gmail.com> wrote: > > > > Hello, > > So I am a newbie programmer just starting to learn Ruby and am > > reading Michael Hartl's book "Learn Ruby The Hard Way". > > > > In exercise 0 (http://learnrubythehardway.org/book/ex0.html) , he > > describes the steps a person must take to get his computer to run > > Ruby, which includes learning how to make a directory in the Terminal, > > change into a directory in the Terminal and use the editor to create a > > file in the directory. > > > > I could complete all the steps successfully except step 11 --- (Use > > your editor to create a file in this directory. You will make the > > file, "Save" or "Save As...," and pick this directory). --- no idea > > how to do this. > > > > Any help appreciated ... > > > > Gengyang > > > > I assume you're using OSX, because "Use your editor to create a file in > this directory. You will make the file, "Save" or "Save As...," and pick > this directory." is step 11 of the OSX instructions. Scream if I'm > mistaken. > > If you say that you have successfully completed all the steps, I think > you meant that you completed all previous steps. Step 13 depends on the > successful outcome of step 11. So, please do repeat all steps again, > especially step 1 and step 2 and then I give you another task: > > Task 11a: Find out what "Your editor" means. > > Then proceed with Task 11 and the rest. > > Regards, > Sebastian > > -- > Sebastian (Rudolfo) Christ > http://rudolfochrist.github.io > GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 > CE71 6407 D6F8 2AC5 55DD
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar
Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Cai Gengyang <gengyangcai@gmail.com> - 2016-04-04 03:59 -0700
Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Sebastian Christ <rudolfo.christ@gmail.com> - 2016-04-05 14:47 +0200
Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Cai Gengyang <gengyangcai@gmail.com> - 2016-04-05 05:59 -0700
Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Sebastian Christ <rudolfo.christ@gmail.com> - 2016-04-05 16:07 +0200
Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Cai Gengyang <gengyangcai@gmail.com> - 2016-04-06 00:42 -0700
Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Sebastian Christ <rudolfo.christ@gmail.com> - 2016-04-06 10:32 +0200
Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Cai Gengyang <gengyangcai@gmail.com> - 2016-04-06 05:14 -0700
Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Robert Klemme <shortcutter@googlemail.com> - 2016-04-06 18:05 +0200
Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Cai Gengyang <gengyangcai@gmail.com> - 2016-04-08 03:29 -0700
Re: Learn Ruby The Hard Way --- Problems with completing the exercise to get my computer to run Ruby Robert Klemme <shortcutter@googlemail.com> - 2016-04-09 20:24 +0200
csiph-web