Use ruby with win32 .bat

may be it is a easy question for anyone, but not for me…

I write a .bat at this path D:\RPGProject\tempShare\SMCS

<<
REM Use this file to launch the utility
set UTILITY_DIR=D:\RPGProject\tempShare\SMCS
rem C:\apps\RMXP_releases\v1.0
set GAME_DIR=D:\RPGProject\tempShare\SMCS
rem C:\apps\RMXP\Game

ruby -C %UTILITY_DIR% startRuby.rb %GAME_DIR%

pause

then a .rb at same path
<<
gets
puts “hello wolrd”

ok ,run it, then I got this:
D:\RPGProject\tempShare\SMCS>REM Use this file to launch the utility
D:\RPGProject\tempShare\SMCS>set
UTILITY_DIR=D:\RPGProject\tempShare\SMCS
D:\RPGProject\tempShare\SMCS>rem C:\apps\RMXP_releases\v1.0
D:\RPGProject\tempShare\SMCS>set GAME_DIR=D:\RPGProject\tempShare\SMCS
D:\RPGProject\tempShare\SMCS>rem C:\apps\RMXP\Game

D:\RPGProject\tempShare\SMCS>ruby -C D:\RPGProject\tempShare\SMCS
startRuby.rb D:\RPGProject\tempShare\SMCS
startRuby.rb:1:in gets': Permission denied - D:\RPGProject\tempShare\SMCS (Errno::EACCES) from startRuby.rb:1:ingets’
from startRuby.rb:1:in `’

D:\RPGProject\tempShare\SMCS>pause

when I open a console and input code like this
ruby
gets
puts $_

it work well…

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