From: Arun Tomar Date: 2012-05-13T01:01:40+09:00 Subject: Re: Beginner's questions Hi! Please find my replies inline. On 05/12/2012 09:04 PM, Manfredi Pivetta wrote: > Hello everyone. > I've recently picked up programming languages yet again, and since I've > spent some time on Ruby in the past already, I've decided to start from > here. However, I've encountered some problems. I've gone through > at least three tutorials already, but they are kind of useless at this > stage for me because they all focus on teaching the syntax and how to > code, while I'm stuck mostly on the tools and libraries. So, here are > my questions; feel free to redirect me towards a proper tutorial if you > wish (as long as the tutorial actually has the information I need...). > > First question. How do I compile Ruby code on Linux? I've tried to look > for a compiler on Ubuntu softwere center and... failed. I'm used to > compiling C code with the gcc command from terminal, is there a similar > command for ruby code? If that's the case, what command is it and what's > the syntax? Does it have meaningful options? (Well, there's --help for > that, but I'd like to hear it first person since sometimes I've troubles > understanding the output of the terminal) Ruby is an interpreted programming language. so no need for compilation. All you need is the ruby interpreter. > > Second question. How do I work with a graphic interface? Is there a > library? If there is a library, is there a reference manual for the > library? I don't require big things, but I've never been able to > actually produce a graphical output, and tutorials do not help in any > meaningful way. I've learned to create even quite complex programs in C, > but they were always on the terminal and the most interesting graphical > output command I had was printf. Since I'm trying to write a program for > some elementary kids, I'd rather avoid the terminal altogether. There are bindings for gtk or qt, and also there are couple of gems which makes life easy to create GUI applications eg: shoes etc. > > Third question. If I compile a ruby program, how can I make sure that > double clicking on it will make it run properly (and activate the above > mentioned user interface)? Again, I'm used to executing programs from > the terminal but I'd rather have something much much simpler for this > project. Do you have any advice? Make the file executable. > > I understand these are some pretty stupid questions, but they got me > stuck for quite a while and I have noone to ask them to. :) > -- Regards, Arun.