Am Mon, 12 Nov 2012 04:58:09 +0900
schrieb Daniela R. [email protected]:
Ruby no longer comes together with SciTE, so I had to download the
SciTE text editor separately. However, I find that Ruby and ScITE do
not work together. The command line in Ruby won’t run or find any
programs that I create with the text editor. How do I get them to
work together? Or how do I get Ruby to find and locate programs and
scripts I write with SciTE?
In order to run scripts, SciTE executes Ruby as an external process.
The exact command it uses is defined in the ruby.properties file (click
“Options” -> “Edit properties” -> “ruby.properties”) via the
configuration option “command.go.*.rb”. This option is automatically
set depending on your platform (i.e. the PLAT_WIN block is used for
Windows, PLAT_MAC for Mac OS, …). Assuming you’re using Windows, the
default command that comes with SciTE looks like this:
$(FileNamExt) is replaced by the full absolute path to the file
currently being edited. Note this command makes two non-trivial
- The “ruby” program must be somewhere in your PATH. If you used the
RubyInstaller, it probably is. If it isn’t SciTE will report
some command-not-found error.
- The file you’re editing is in a directory whose path doesn’t contain
spaces. $(FileNameExt) doesn’t take care of escaping spaces, and they
are then interpreted by CMD when SciTE executes that command,
stashing the command to rubbish. This is especially an issue on
Windows XP where the default user’s home directory contains already
spaces as it’s located under “C:\Documents and Settings”.
To resolve 1) if not already, you must add the bin/ directory of your
Ruby installation to your PATH variable. To resolve 2), simply change
the above configuration option to this:
Quoting the filename will prevent CMD from interpreting the spaces in
the filename and make it take it as a whole and pass it on to Ruby as a
single argument as Ruby expects it.
Of course you could also just skip 2) and use ruby directly from the
FYI, I’m a programming newbie.