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!!
on 2012-11-10 10:37
on 2012-11-10 14:28
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 2012-11-10 16:52
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!!
on 2012-11-10 17:18
On Sat, Nov 10, 2012 at 7:52 AM, Carlos A. <lists@ruby-forum.com> 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.
on 2012-11-10 22:32
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. .
on 2012-11-10 23:04
On Sat, Nov 10, 2012 at 3:32 PM, 7stud -- <lists@ruby-forum.com> 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.
on 2012-11-11 00:07
True. Why not try Gedit or maybe sublime text 2? Just a suggestion. On Sat, Nov 10, 2012 at 4:59 PM, Eric Christopherson <
on 2012-11-11 00:27
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 Agarie Control engineering student Polytechnic School University of So Paulo 2012/11/10 Nelvin <nspryspartan@gmail.com>
on 2012-11-11 02:14
I really enjoy this mailing list you can really learn a lot, I didn't know about that book. Thanks Carlos Agarie. I'll be looking into that.
on 2012-11-11 05:43
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
on 2012-11-11 09:59
Am 11.11.2012 00:18, schrieb Carlos Agarie: > 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 Pine'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).
on 2012-11-11 12:03
unknown wrote in post #1083921: > Am 11.11.2012 00:18, schrieb Carlos Agarie: >> 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 Pine'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 Pine's book it's pretty good.
on 2012-11-11 21:04
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!
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.