Complete newbie

Hey guys!
Sorry but I’m completely new to this…programming in general but would
like to start learning ruby. I am trying to do this:
http://pine.fm/LearnToProgram/?Chapter=01
I am on a IMAC, have downloaded text wrangler, but am unable to save the
program it says…or don’t know how.
Do I have to write it in text wrangler save it and then run it on the
terminal? If so, how?

Thanks for your help!!

You have to save the file with the extension *.rb, then open your
terminal, place your working zone in the path you have your file saved,
then run it like this:

ruby something.rb

On Sat, Nov 10, 2012 at 7:52 AM, Carlos A. [email protected] wrote:

I have saved the text wrangler file on my desktop, so I open the
terminal, type irb for ruby,

That’s wrong; if you want to run the program in the file, do exactly
as Damian said, e.g. ruby /Desktop/calc.rb

Run irb when you want to do interactive experimentation.

Thanks so much!!
Finally got it going!
Thanks man!!

Your mac already comes with an excellent, powerful computer programming
text editor–it’s
called vim. To learn how to use it, open up Terminal and type:

$ vimtutor

You can also search ‘vim’ to learn how to configure it any way you want.
Once you get the basics down, you can download macvim to get even more
features.
Then search for the best macvim plugins to see all the other features
you can implement.
.

Hi Damián,

Thanks for your help, however, as I said I am completely new and don’t
seem to be able to make it work.
I have saved the text wrangler file on my desktop, so I open the
terminal, type irb for ruby,
and on the next line write /Desktop/calc.rb and I get an error, here the
full deal:

Last login: Sat Nov 10 15:20:19 on ttys000
iMac-de-Carlos:~ carlosamengual$ irb

/Desktop/calc.rb
SyntaxError: compile error
(irb):1: unknown regexp options - calc
from (irb):1

Any help would be greatly appreciated!!

True. Why not try Gedit or maybe sublime text 2? Just a suggestion.

On Sat, Nov 10, 2012 at 4:59 PM, Eric C. <

Hey Carlos (same name as me :),

Sublime Text 2 should be pretty easy for you to learn. Google it and try
for some time.

Also, I recommend learning a bit more about how to use Terminal (nothing
fancy, just the basic commands), there should be plenty of tutorials on
the
Internet.

And buy a good book on Ruby - I recommend Eloquent Ruby. It might sound
strange, because there’s so many stuff on the net, but a well-written
book
can help you learn lots of stuff in a good order with minimal pain.

Good luck!


Carlos A.
Control engineering student
Polytechnic School
University of So Paulo

2012/11/10 Nelvin [email protected]

On Sat, Nov 10, 2012 at 3:32 PM, 7stud – [email protected] wrote:

Your mac already comes with a computer programming text editor–it’s
called vim. To learn how to use it, open up Terminal and type:

$ vimtutor

You can also search ‘vim’ to learn how to configure it any way you want.
Once you get the basics down, download macvim to get even more features.

Let’s not distract a newbie with a funky editor. I love Vim, but it’s
too much to learn when you’re also learning programming for the first
time.

Hi there,

It’d be great if someone can forward me this entire thread to see all
the
replies. I’m also a complete newbie and looking for somewhere to start.

-Dani

Am 11.11.2012 00:18, schrieb Carlos A.:

And buy a good book on Ruby - I recommend Eloquent Ruby. It might sound
strange, because there’s so many stuff on the net, but a well-written
book can help you learn lots of stuff in a good order with minimal pain.

It’s a great book, but maybe rather not for a “complete newbie”,
because it requires some basic understanding of Ruby.

To someone who has never done any programming before I like to
recommend Chris P.'s tutorial or better book (the book provides
two sets of possible solutions, one that uses only concepts and
syntax elements that have already been discussed, and one that
presents a somewhat more advanced/elegant approach).

I really enjoy this mailing list you can really learn a lot, I didn’t
know
about that book. Thanks Carlos A… I’ll be looking into that.

unknown wrote in post #1083921:

Am 11.11.2012 00:18, schrieb Carlos A.:

And buy a good book on Ruby - I recommend Eloquent Ruby. It might sound
strange, because there’s so many stuff on the net, but a well-written
book can help you learn lots of stuff in a good order with minimal pain.

It’s a great book, but maybe rather not for a “complete newbie”,
because it requires some basic understanding of Ruby.

To someone who has never done any programming before I like to
recommend Chris P.'s tutorial or better book (the book provides
two sets of possible solutions, one that uses only concepts and
syntax elements that have already been discussed, and one that
presents a somewhat more advanced/elegant approach).

Agree, I was also a newbie like Carlos, what awake me the passion for
Ruby was Why’s Poignant Guide to Ruby, is a free book, you can find it
in .pdf and my though is that it’s for newbies, it teachs you the basics
of Ruby from the void and going slowly and slowly incrementing the
difficult, teaching you some skills, the book is told as a story so it’s
pretty enjoyable. I also read Chris P.'s book it’s pretty good.

Wow!! This is amazing! That you all for the amazing help/suggestions.
I’m going try a a couple of free things I’ve found online and then I’ll
move on to books!
Thank you all so much for your help!