Here's some solutions for scite configuration mistakes from another list:
---------->
Hello,
today I installed Ruby per 1.8.2-14 final and tried to adapt scite
like it was before (previous version installed per
1.8.0-10), according to the tips documented on:
http://www.rubygarden.org/ruby?SciTEAndStdinStdout
(Old ruby.properties file contained:
if PLAT_WIN
command.go.*.rb=3Dcmd /c ruby $(FileNameExt) < con: > con:
=09command.go.subsystem.*.rb=3D1
=09command.go.*.rbw=3Drubyw $(FileNameExt)
=09command.go.subsystem.*.rbw=3D1
command.compile.*.rb=3Dcmd /c ruby -d -r debug $(FileNameExt) < con: > =
con:
=09command.compile.subsystem.*.rb=3D1
=09command.compile.*.rbw=3Drubyw -d -r debug $(FileNameExt)
=09command.compile.subsystem.*.rbw=3D1
command.build.*.rb=3Dcmd /c ruby myscript.rb $(FileNameExt) < con: > c=
on:
=09command.build.subsystem.*.rb=3D1
)
The advantage of the above setting was: stdin/out in a DOS-Box, error
output in output pane of SciTE.
1.)
As there were many enhancements in SciTE, I first tried to use it
out-of-the-box with the following script:
----------------
puts "Hello"
x =3D gets=20
puts "Got: " + x
gets # keep DOS box open until <return>
----------------
it doesn't work successfully:
A DOS-Box is opened but does not write any output or take any input.
I tried:
a) Clicking into the output pane (which gains focus then).
Now you can type in some string, enter return two times and all=20
output is shown then.
=3D> You have to insert '$stdout.flush' after each 'puts' line to get=20
output shown immediately in the output pane (but the DOS box is a dead
window only).
Also:
b) Changing the subsystem to '0' makes the script work in the output pane=
=20
(no DOS-Box is opened), but output is again shown only after the last 'gets=
',
as it is buffered.
You have to insert '$stdout.flush' here too after each 'puts' line.
Also the cursor stays in the code pane and focus must be changed by
explicitly clicking into the output pane.
=20
c) Changing the 'go' command to :
command.go.*.rb=3Dcmd /c ruby $(FileNameExt) < con: > con:
which worked pretty fine in 1.8.0-10, but doesn't work at all
d)
SOLUTION: is to simply change the subsystem to '2'. An extra Window is=20
opened and all works as expected.
BUT: When having errors (you can e.g. force a syntax error), error
output is not sent to output pane, like it was in
my documented setting in the 1.8.0-10
installation.
2.) IRB - new command in SciTE now
Starting irb with the command setup as in ruby.properties opens the irb pro=
mpt
in the scite output pane, but every input is echoed double.
This way working is very annoying.
Seems that the subsystem command is wrong:
command.3.subsystem.*.rb=3D1
instead of:
command.subsystem.3.*.rb=3D1
(*rbw too)
Then setting subsystem to '2' ...
command.subsystem.3.*.rb=3D2
... opens IRB in own window and all is perfect.
Another try, keeping subsystem with '0' and setting command.quiet.3.*.rb=3D=
1=20
starts IRB in output pane, but NO output is displayed at all.
So starting it in separate window is the only way.
3.) Starting Debugger - unfortunately missing in the properties:
command.name.4.*.rb=3DDebug
command.4.*.rb=3Druby -d -r debug $(FileNameExt)
command.subsystem.4.*.rb=3D2
command.name.4.*.rbw=3DDebug
command.4.*.rbw=3D ruby -d -r debug $(FileNameExt)
command.subsystem.4.*.rbw=3D2
Starts the script in the debugger in a separate window. Works fine.
The command for *.rbw is exactly the same as for *.rb, as i/o has to work=
=20
identically for debugging.
4.) Help: The path is not adapted on installation.=20
My installation dir is: D:\MyData\Ruby
But the setting after installation was:
command.help.*.rb=3D$(CurrentWord)!C:\Ruby\ProgrammingRuby.chm
command.help.subsystem.*.rb=3D4
command.help.*.rbw=3D$(CurrentWord)!C:\Ruby\ProgrammingRuby.chm
command.help.subsystem.*.rbw=3D4
(Yes, I know, this problem should be reported separately)