Ruby windows environment question

After having installed ruby on a windows system, what environment
variable do I need to load with my path to my documents directory so
that I don’t need to key the whole path in each time I send a script to
ruby for work? I have ruby working much better on Slackware 13.0 and
use screen readers on all environments and was pleasantly surprised ruby
speaks when it runs on Windows but I’m having a little trouble setting
things up to run nicely. The netbeans I.D.E. I found inaccessible and
aptona can’t be downloaded here since that site didn’t keep their
certificates up to date. For those interested, screen readers routinely
get used by dyslectics and blind people I get to use them since I’m
blind.

DaShiell, Jude T. CIV NAVAIR 1490, 1, 26 wrote:

After having installed ruby on a windows system, what environment
variable do I need to load with my path to my documents directory so
that I don’t need to key the whole path in each time I send a script to
ruby for work?

I presume you mean
c:\go\file1.rb exists and you want to be able to do

c:>file1.rb

and have it run.

)

you might be able to get it to work by once “executing it” in explorer.
It should then show up in PATHEXT, mine is:

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.wlua;.lexe;.RB;.RBW

if that doesn’t work then you could write a batch file that searches the
path, and executes it for you.
Anybody done this before?
-r

Let’s see, when I ran beer.rb before, I used:
Ruby “d:/documents and settings/jude.dashiell.DEV/my documents/beer.rb”

I’d like to be able to do:
Ruby .\beer.rb
Or even cd rubydir and
Ruby beer.rb .
I found out if I run something like:
Ruby “d:/documents and settings/jude.dashiell.DEV/my documents/beer.rb”

beer.log
The beer.log file was put into d:/documents and
settings/jude.dashiell.DEV/my documents/beer.log I didn’t know where
that file would land once I made it before.

On Sep 23, 11:38 am, “DaShiell, Jude T. CIV NAVAIR 1490, 1, 26”
removed_email_addre[email protected] wrote:

After having installed ruby on a windows system,

What version of Ruby? from where did you download the packages? (a
nice “ruby -v” of the output will help)

what environment
variable do I need to load with my path to my documents directory so
that I don’t need to key the whole path in each time I send a script to
ruby for work?

What do you mean by this?

Do you cd into your script directory and want to call it “script.rb”
and it work?

If so, check RubyInstaller settings when installing like
“associated .rb with Ruby” and “Add Ruby to the PATH”

I have ruby working much better on Slackware 13.0 and
use screen readers on all environments and was pleasantly surprised ruby
speaks when it runs on Windows but I’m having a little trouble setting
things up to run nicely. The netbeans I.D.E. I found inaccessible and
aptona can’t be downloaded here since that site didn’t keep their
certificates up to date. For those interested, screen readers routinely
get used by dyslectics and blind people I get to use them since I’m
blind.

On NetBeans you need to indicate where it will find the interpreters.
Everything looks like you haven’t installed a Ruby version that is
available in the PATH and therefore, NetBeans couldn’t find it.

See the Tools/Ruby platforms menu and look for your Ruby installation
executable.

The package came from http://www.ruby-lang.org and is 1.87p3. The
environment is windows xpsp3.

On Sep 23, 4:18 pm, “DaShiell, Jude T. CIV NAVAIR 1490, 1, 26”
[email protected] wrote:

The package came fromhttp://www.ruby-lang.organd is 1.87p3. The environment is windows xpsp3.

There is no such version at ruby-lang.org

Please provide the exact “ruby -v” output in the console.

Also, you can CD into the directory where your script is and invoke:

ruby script.rb

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs