OK! I have it here… I just checked through the Windows XP stuff on my
PC…
I think this is what you need to do.
Open a folder.
Select Tools > Folder Options
Tab: File Types
Scroll down till you find RB in the list
In the box that says ‘Details for …’ click on [Advanced]
There is a box called ‘Actions’
Select the open action - create a new one called open if it isn’t
there
In the pop-up window, these are my settings:
Action: open
Application used to perform this action: “c:\ruby\bin\ruby.exe” “%1”
%*
[x] use DDE
Application: ruby
Topic: System
(other fields blank)
[OK]
Jayson, if your not on a real OS, you need to associate the extension
.rb with the interpreter. It’s been a little while since I’ve done
this in windows, but it’s actually pretty straightforward. You may
have to google for how to associate the script with the interpreter
though, as I don’t recall the exact steps.
That used to happen when installing the 1-click[sic] version.
(It’s in the PATHEXT system environment variable. I think there has to
be something n the registry as well, but you could get that by
right-clicking a .rb file and selecting the app to always open files of
that type.)
Anyways, on my Vista box, it all works fine. I type the name of a
script, no file extension, passing args, and all is super cool awesome.
I’ve never had to explicitly invoke ruby, even on XP. It’s one case
where Windows did the right thing reliably.
Frustratingly, I got this working fine at work. I can type
my_script args
and I get the proper results. Now my propblem is my home pc. I have
tried all the fixes above, but I still have to type
my_script.rb args
unless I inclued the .rb extension, the script will not run.
Frustratingly, I got this working fine at work. I can type
my_script args
and I get the proper results. Now my propblem is my home pc. I have
tried all the fixes above, but I still have to type
my_script.rb args
unless I inclued the .rb extension, the script will not run.
In general, you should need to type in the extension as part of the
program name cos the extension is what tells Windows what to do with
it. The exception is a list of extensions that Windows treats as
executables. These are usually .exe, .com, . bat, .cmd etc - in these
cases, typing the extension is optional.
This is controlled in a variable called PATHEXT in the environment. In
a command window, I did:
command>set
This gives me a list of extensions that are already there: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW
YOU ROCK !
I am embarrassed to have been goofing with computers for so many years
without knowing these basics. Anyway everything is working the way I
want, and I have learned some very useful basics.
Thanks!
YOU ROCK !
I am embarrassed to have been goofing with computers for so many years
without knowing these basics. Anyway everything is working the way I
want, and I have learned some very useful basics.
Thanks!
me too
I had these items in peripheral vision, but your queries made me chase
them down