From: Stefano Crocco Date: 2012-05-13T02:25:29+09:00 Subject: Re: Beginner's questions Il giorno Sun, 13 May 2012 01:17:26 +0900 Manfredi Pivetta ha scritto: > @Stefano: grazie. > The line you gave me (#!/usr/bin/ruby)... what does it exactly do? Where > can I find information on it or similar commands? In Unix systems (including linux) that line, at the beginnning of a script, tells the operating system which progrogram to use to execute it. See [1] for more. > The chmod you mentioned is a library? chmod is a standard command line program on all Unix systems (including linux). It is used to change the permissions on a file or directory. To know more about it you can look at its man page with the command man chmod You can also look at the wikipedia entry on it ([2]). > Do I need to import libraries manually like in > C? The environment I used in the past had a bunch of pre-written hidden > code that might have done it, so I'm a bit confused at the moment. If I understand your question correctly, yes you do. To use a library, you must first install it, which often is done with a simple gem install libraryname issued from a terminal (you should consult the library documentation, however). After that, from your ruby program, you require the library with: require 'libraryfile' Often, libraryfile is the same as the name of the library. Again, for more information, you should look at the documentation for the library. Also, look at any ruby tutorial for more documentation about require. > I'll look into the packages you've linked. As for the third question, > the program will need to work on Windows. I fear I can't help you there, as I've never tried to do this on windows. Stefano [1] http://en.wikipedia.org/wiki/Shebang_(Unix) [2] http://en.wikipedia.org/wiki/Chmod