really beginner question

Discussion in 'Ruby' started by rocksonchan, Dec 1, 2008.

  1. rocksonchan

    rocksonchan Guest

    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?
    rocksonchan, Dec 1, 2008
    #1
    1. Advertising

  2. rocksonchan

    Trent Jones Guest

    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/.
    Trent Jones, Dec 1, 2008
    #2
    1. Advertising

  3. 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
    --
    Sandor Szücs, Dec 1, 2008
    #3
  4. rocksonchan

    Max Williams Guest

    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/.
    Max Williams, Dec 1, 2008
    #4
  5. rocksonchan

    Todd Benson Guest

    On Mon, Dec 1, 2008 at 6:54 AM, Max Williams
    <> 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
    Todd Benson, Dec 1, 2008
    #5
  6. rocksonchan

    James Britt Guest

    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
    James Britt, Dec 1, 2008
    #6
  7. 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/.
    Lloyd Linklater, Dec 1, 2008
    #7
  8. rocksonchan

    Max Williams Guest

    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/.
    Max Williams, Dec 1, 2008
    #8
  9. rocksonchan

    William Koch Guest

    [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 <>

    > 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?
    >
    >
    William Koch, Jan 15, 2009
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Amir
    Replies:
    3
    Views:
    586
  2. AMT2K5
    Replies:
    16
    Views:
    649
    Martin Gregorie
    Mar 9, 2006
  3. nc
    Replies:
    1
    Views:
    486
    nice.guy.nige
    Feb 3, 2005
  4. =?Utf-8?B?TFc=?=
    Replies:
    8
    Views:
    403
    =?Utf-8?B?TFc=?=
    Apr 25, 2007
  5. LW
    Replies:
    1
    Views:
    168
    Alexey Smirnov
    May 2, 2007
Loading...

Share This Page