Rubyw confusion


#1

I know that using rubyw.exe will run my Ruby/TK applications without
giving me a command line, but I don’t know how to set this up in
Windows. For instance, right now if I double-click my ruby programs
from Windows Explorer I get a command window. How do I set windows up
so that it runs rubyw.exe for that application instead of ruby.exe?

I do most of my stuff in Linux, and Windows is not my strong suit.


#2

On 3/5/07, Alex DeCaria removed_email_address@domain.invalid wrote:

I know that using rubyw.exe will run my Ruby/TK applications without
giving me a command line, but I don’t know how to set this up in
Windows. For instance, right now if I double-click my ruby programs
from Windows Explorer I get a command window. How do I set windows up
so that it runs rubyw.exe for that application instead of ruby.exe?

I do most of my stuff in Linux, and Windows is not my strong suit.

Open any explorer window (e.g. my computer), Tools | Folder Options |
File Types, find .rb, Advanced, choose open action, Edit, replace ruby
with rubyw.

Or, use .rbw extension.


#3

Windows is not my strong suit.

Not mine either… So this might not work.

Basically change the application to open ruby files to be rubyw.exe
and not ruby.exe. (Right click, Properties, Open with…). This should
cause all your ruby scripts to be opened with rubyw though, which may
not be intended.
OTOH if you need a console, you can always explicitly open one and
start ruby from there, or create different file extensions for rubyw
and ruby files. You might even be able to set default applications
per folder or somesuch nonsense.
-tim