From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-01-12T11:45:28+09:00 Subject: Re: Newbie Q's... Welcome... In article <20020111173607.4d1eb613.wildbill@speakeasy.org>, Bill Turner wrote: >I have just installed Ruby 1.6.6 under Linux. I have d/l'd the FAQ >and the hmtl version of the "Programming Ruby" book. I have not had >time to do more than skim those so far. From what I saw in the book >Ruby sounds like a very interesting language. I particularly like the >"multiple platform" capabilities I've seen described, and that is >actually what my primary question concerns. > >I have seen Ruby called a "scripting language" and compared, very >favorably, to Python and Perl both. I have experience with neither of >those, nor with smalltalk, nor Java. Ruby will be my first venture >into the "Land of OOP" and I am looking forward very much to doing >that. May your excursion be enjoyable. Actually, for learning OOP Ruby is an excellent choice. > >My biggest question right now is very simple really. If I design and >code a project using Ruby - under Linux - then how would I go about >getting that application to run under Windows? Is there some kind of >a "run time" deal like Visual Basic has? After all, from my >perspective, I can hardly expect every person that wanted to install >my application to have Ruby already installed and just sitting there >waiting for me. :) > Hmmm... at first I thought the question was how do I get an application written in Ruby on Linux to work under Windows. Now that I reread it it seems that you want to be able to give someone a Ruby program and have it run under Windows even if they don't have Ruby installed. To be honest, I'm not sure what the answer is to that question. >What libraries, etc. would I need to include with my app to be sure >the user had it available on their system? I saw in the book that >Ruby can be used to "code GUI apps" but that was as far as I got. >Only so many hours in the day after all. :) What's needed to do that? > Well, you need to pick a GUI toolkit to learn. I believe that TK bindings come with Ruby. On Windows the FOX toolkit also comes with the installation now (in addition to TK) - not sure it it comes with the source tar file for building on Linux, though. So, I think that if you're on Linux you can use TK 'out of the box'. And the Programming Ruby book has TK examples in it. > >Are these questions already answered in the book (or the FAQ)? If >they are then I would appreciate a pointer to the correct spot please. > If not then if someone could direct to where I could get them >answered that would be great. I'm hoping this is the right place. >Even for "stone Newbies" like me. :) > This is a good place for questions you can't find answers to in the book or faq. We try to be nice to Newbies :-) >One final question. I saw that the Ruby install had included some >"*.el" files to help with writing Ruby code using Emacs. I was very >pleased to see this as Emacs is my editor of choice. I modified my >emacs file to load those up and I guess my next question is how to go >about actually using them. Is it something that is "automatic" - like >it is with C? I started just writing a little test thing but when I >loaded Emacs it told me I was in "text mode" and I was thinking that >if I loaded a file with the .rb it should have put me into "ruby-mode" >instead of "text-mode" so I just kind of left it be for the moment >until I could find more time to look into it. What is it exactly that >"ruby-mode" will do for me? I did see somewhere a description of how >to do some formatting of the "ruby source" (to show results or >something like that I think it was) but that was all, so far at least. > Can't help you here, I'm a vim user. Phil