How Do I Setup the Notepad++ Run Command for Ruby?
- by EstanislaoStan
I'm trying to setup the Notepad++ IDE so that when I press F6 the Ruby script I'm editing will run. After searching the internet I've found that putting [cmd /K ruby "$(FULL_CURRENT_PATH)"] without the brackets into the run dialogue box that pops up when I press F5 will run basic scripts in the Command Prompt (I'm using Windows 7). However, if my code loads any external data such as .txt files, or as I've found with Gosu, loads any image files, Ruby complains that things do not exist which do in fact exist. I know my code and Ruby installation (Ruby 1.9.3) are fine because prior to now I've been using FreeRIDE, an older, somewhat buggy IDE that I've grown tired of, and my code runs fine when I press F5 using that IDE.
Some examples of the complaints follow.
My Text Adventure:
C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Fold
er/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFileParser.rb:8:i
n `initialize': No such file or directory - Example Dungeon Creator File.txt (Er
rno::ENOENT)
from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text
Focused Folder/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFile
Parser.rb:8:in `open'
from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text
Focused Folder/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFile
Parser.rb:8:in `encapsulate_method'
from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text
Focused Folder/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFile
Parser.rb:117:in `sort_room_data_external_method'
from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text
Focused Folder/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFile
Parser.rb:125:in `<main>'
D:\Programming Stuff\Notepad++>
My Gosu Program:
C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Fold
er/Ruby Scripts/Game Development/Circular Motion.rb:10:in `initialize': Could no
t load image media/Space2.png using either GDI+ or FreeImage: Unknown error (Run
timeError)
from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text
Focused Folder/Ruby Scripts/Game Development/Circular Motion.rb:10:in `new'
from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text
Focused Folder/Ruby Scripts/Game Development/Circular Motion.rb:10:in `initiali
ze'
from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text
Focused Folder/Ruby Scripts/Game Development/Circular Motion.rb:181:in `new'
from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text
Focused Folder/Ruby Scripts/Game Development/Circular Motion.rb:181:in `<main>'
D:\Programming Stuff\Notepad++>
If anyone could lend any help at all I'd really appreciate it.