Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > really beginner question

Reply
Thread Tools

really beginner question

 
 
rocksonchan
Guest
Posts: n/a
 
      12-01-2008
hi all, as shows on the subject, it is a really really beginner
question.

i was trying to do the "hello world!" on my mac (v10.4 with ruby
1.8.2) in text editor,
but i could not save it with a .rb extension.

can someone please point out what i did wrong ?
thz in advance.

p.s. is there any simple free editor program for beginner that will
help me to learn ruby better?
 
Reply With Quote
 
 
 
 
Trent Jones
Guest
Posts: n/a
 
      12-01-2008
In response to a free editor program, I use SciTE, I believe there is an
open to install it when you install ruby, but I'm on a Windows machine,
not sure if SciTE is available for Mac...a quick google search ("Mac
coding editor") brought up Smultron (http://tuppis.com/smultron/) which
is free and looks like it will do the job.

The documentation page on the Ruby website
(http://www.ruby-lang.org/en/documentation/) has numerous tutorials
which should be able to help you out with most of the basics. If you
have installed ruby correctly it should be as simple as saving the file
as MyFileName.rb
The file name doesnt have to be the same name as the class name or
anything, though it would be useful for larger programs that implement
various classes.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Sandor Szcs
Guest
Posts: n/a
 
      12-01-2008
Hi!
On 01.12.2008, at 07:54, rocksonchan wrote:
>
> i was trying to do the "hello world!" on my mac (v10.4 with ruby
> 1.8.2) in text editor,
> but i could not save it with a .rb extension.


If you use TextEdit then you should change the preferences so that
you use plaintext format instead of the Rich/RTF format (default?).

Also you can try google and test some other text editors. There are
really plenty of it.

> can someone please point out what i did wrong ?


I think there's some osx magic stuff that change the suffix of your
file to .txt or .rtf. Try to change the finder.app settings and you
will see it.

> p.s. is there any simple free editor program for beginner that will
> help me to learn ruby better?


No Texteditor will ever help you to learn a language.

hth, Sandor Sz=FCcs
--




 
Reply With Quote
 
Max Williams
Guest
Posts: n/a
 
      12-01-2008
All the mac-owning rubyists i know use Textmate. Stay away from IDEs:
a simple text editor and the command line is better.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Todd Benson
Guest
Posts: n/a
 
      12-01-2008
On Mon, Dec 1, 2008 at 6:54 AM, Max Williams
<(E-Mail Removed)> wrote:
> All the mac-owning rubyists i know use Textmate. Stay away from IDEs:
> a simple text editor and the command line is better.


I don't use a Mac, but amen to that. My experience with IDE's has
been horrible (think "tied down"), so I may be a bit biased.

To the OP, you might want to upgrade your Ruby to 1.8.6, and if you
are really ambitious, try vim for the text editor. In the long run,
you'll be glad you learned it.

Saving your code on the Mac is probably best done using Textmate. Of
course, there are other options.

Todd

 
Reply With Quote
 
James Britt
Guest
Posts: n/a
 
      12-01-2008
Max Williams wrote:
> All the mac-owning rubyists i know use Textmate.


I know mac-owning rubyists who use Netbeans for it's auto-completion
and refactoring tools.

> Stay away from IDEs:
> a simple text editor and the command line is better.


I know another Mac-owning Rubyist who swore by the use of an IDE because
of its ability to show and search project files.

I, a non-Mac owning Rubyist, prefer gvim and some shells, but there are
some IDEs (Netbeans, for example) that are extremely handy for various
tasks, including learning Ruby.


--
James Britt

www.happycamperstudios.com - Wicked Cool Coding
www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff

 
Reply With Quote
 
Lloyd Linklater
Guest
Posts: n/a
 
      12-01-2008
rocksonchan wrote:
> p.s. is there any simple free editor program for beginner that will
> help me to learn ruby better?


Personally, I recommend that you go to http://www.sun.com/ and get
netbeans. You will be able to add ruby as one of the languages used and
it is really great AND free. It is not the only one but I highly
recommend it. Sun is actively supporting ruby these days and to very
good effect.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Max Williams
Guest
Posts: n/a
 
      12-01-2008
Lloyd Linklater wrote:
> rocksonchan wrote:
>> p.s. is there any simple free editor program for beginner that will
>> help me to learn ruby better?

>
> Personally, I recommend that you go to http://www.sun.com/ and get
> netbeans. You will be able to add ruby as one of the languages used and
> it is really great AND free. It is not the only one but I highly
> recommend it. Sun is actively supporting ruby these days and to very
> good effect.


Actually, when i did used to use an IDE i did use netbeans, which has
good ruby debugging tools.

The two approaches (IDEs vs text editor/command line) have their own
advantages and disadvantages. For example IDEs can be better for
debugging, but have a tendency to try to wrap lots of things that are
better done at the command line. If you need to do something new, it's
much easier to follow a tutorial that says "paste this into your command
line" than it is to follow some instructions regarding IDE option menus,
config screens etc.

Maybe the best approach is to use an IDE but not be too dependent on it:
try to use the command line for as much as possible.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
William Koch
Guest
Posts: n/a
 
      01-15-2009
[Note: parts of this message were removed to make it a legal post.]

Sorry for being so late on this, but I would like to recommend you
Smultron: http://tuppis.com/smultron/It's a really simple editor, but it has
syntax highlighting, and it's free.

I'd like to recommend you to see this site too: http://osx.iusethis.com/ it
shows a lot of programs for mac, and how many people uses them:
http://osx.iusethis.com/app/textmate has 5009 fans and
http://osx.iusethis.com/app/smultron has 1974.

I'm still a beginner, and started with smultron, now I'm using textmate.

William Koch


2008/12/1 rocksonchan <(E-Mail Removed)>

> hi all, as shows on the subject, it is a really really beginner
> question.
>
> i was trying to do the "hello world!" on my mac (v10.4 with ruby
> 1.8.2) in text editor,
> but i could not save it with a .rb extension.
>
> can someone please point out what i did wrong ?
> thz in advance.
>
> p.s. is there any simple free editor program for beginner that will
> help me to learn ruby better?
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms Authentication - Really really basic question LW ASP .Net Security 1 05-02-2007 11:25 AM
Forms Authentication - Really really basic question =?Utf-8?B?TFc=?= ASP .Net 8 04-24-2007 11:54 PM
Really basic data entry question [Beginner] AMT2K5 Java 16 03-09-2006 05:44 PM
No Class at ALL!!! beginner/beginner question =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?= ASP .Net 7 02-03-2005 02:47 PM
Tutorial for beginner/ Tutorial voor beginner Rensjuh C++ 7 09-02-2004 12:41 AM



Advertisments