Find the answer to your Linux question:
Results 1 to 5 of 5
I've got Ruby and a few others loaded on SUSE 10.1 . . . so how do I start using them? Is there a GUI for these? I know, if ...
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Location
    Phoenix, Arizona
    Posts
    8

    Scary programming question

    I've got Ruby and a few others loaded on SUSE 10.1 . . . so how do I start using them? Is there a GUI for these?

    I know, if I don't even know how to start it, then I'll probably destroy something without even knowing it. But I'd like to try anyway. I learn best by breaking . . . I mean reverse-engineering!

    David

  2. #2
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,621
    To use languages like perl, python and ruby, you create your script before hand and then type:
    Code:
    ruby <name of ruby script>
    So, for example, if I create a script called test.rb and it was in my ruby_scripts folder in my home directory, I would execute the following (assuming I am in my home directory):
    Code:
    ruby ruby_scripts/test.rb
    Hope that helps,
    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  3. #3
    Linux Guru Juan Pablo's Avatar
    Join Date
    Mar 2006
    Location
    /home/south_america/ecuador/quito
    Posts
    2,064
    You won't destroy anything unless you run the script as root
    Put your hand in an oven for a minute and it will be like an hour, sit beside a beautiful woman for an hour and it will be like a minute, that is relativity. --Albert Einstein
    Linux User #425940

    Don't PM me with questions, instead post in the forums

  4. #4
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117

    Hello, world

    Hi, davidm777.

    Assume you have entered this in file r1:
    Code:
    #!/usr/bin/ruby -w
    
    # (@)# r1       Display hello, world with ruby.
    
    puts " Hello, world."
    Then:
    Code:
    chmod +x r1
    then:
    Code:
    % ./r1
     Hello, world.
    An IDE that I've been keeping my eye on is:
    http://www.activestate.com/Products/Komodo/

    Best wishes, keep us posted on your progress ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  5. #5
    Just Joined!
    Join Date
    Nov 2006
    Location
    Phoenix, Arizona
    Posts
    8
    I guess I was used to GUI-type OO stuff on Windows! This seem more like . . . "real" programming (hahaha).

    Much thanks to all!
    David

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...