On 01.01.2010 03:25, Roger B. Atkins wrote:
In between attempts, I did some playing at the command prompt. In the
process I remembered that DOS doesn’t recognize directory names
containing multiple words with spaces between them. Since my earlier
source files are all in a directory named “Ruby Files”, I thought the
directory name might be part of the problem. I changed the directory
name to RubyFiles, but it did not solve the problem.
I notice that now SciTE shows “ruby test3.rb” before the results,
whereas earlier it was just showing the file name without "ruby " in
front of it. Perhaps the active directory changed in SciTE.
This looks like SciTE on Windows doesn’t use your PATH variable (by
default, the RubyInstaller, as well as the old Ruby O.-Click installer
put Ruby into your path, os you can use it from anywhere), and instead
some hardcoded paths, or so.
Anyway, I will put all my files in the directory with ruby since I can’t
seem to control SciTE.
I’d stop using SciTE instead, so you can keep your Ruby nice and clean,
and avoid possible problems when upgrading / changing your Ruby
installation.
If you open a command line (Start Orb -> type “cmd” sans quotes and hit
enter), and then type “path”, sans quotes again, can you find Ruby in
there somewhere? If that is the case, you can run Ruby scripts from
anywhere you like (including paths with Spaces, like your “Ruby Files”
directory).
You can’t use SciTE’s comfort, unfortunately (and installing, say,
NetBeans 6.8 with Ruby would be overkill), and instead have to use the
commandline “ruby script.rb”.
For example:
c:\Scripts>ruby gemconfig.rb
sitedir: C:/Ruby/lib/ruby/site_ruby
bindir: C:/Ruby/bin
sitelibdir: C:/Ruby/lib/ruby/site_ruby/1.8
datadir: C:/Ruby/share
vendordir:
EXEEXT: .exe
libdir: C:/Ruby/lib
vendorlibdir:
ruby_install_name: ruby
RUBY_SO_NAME: msvcrt-ruby18
ruby_version: 1.8
arch: i386-mingw32
c:\Scripts>cat gemconfig.rb
require “rubygems”
Gem::ConfigMap.each do |config,value|
puts “#{config}: #{value}”
end
c:\Scripts>path
PATH=C:\Ruby\bin;
Note that “cat” is not available on your Windows install, unless it’s
setup similar to mine.
Also note, that I abbreviated the mess that is my path environment so
that you can easily spot what you should find there.