How to Edit and Run a Simple Ruby Script in Ubuntu 10.10

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,674
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 8, 2011

Peter Cooper demonstrates how to use the default text editor (gedit) in Ubuntu 10.10 Linux as a basic editor for Ruby files and then how to run a Ruby script at the Terminal.

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (2)

Sign In or Sign Up now to post a comment!
  • @virumoz I'm not really into running with warnings personally, but thanks for sharing that as some people will find it useful/interesting.

  • One recommendaton -- make it a habit to invoke your Ruby scripts with the »-w« option, like so:

    ruby -w testscript.rb

    This way you won't miss any suggestions or warning the Ruby interpreter might have for your script, e.g. ambivalent syntax (which happens in some situations where whitespace and/ or missing parens are involved).

    Alternatively, you can prepend a so-called »shebang« as the first line in your Ruby scripts and add the »-w« switch there (i.e. #!/usr/bin/ruby -w).

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more