title: How Do I Setup the Notepad++ Run Command for Ruby?
body: <p>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 
  <code>cmd /K ruby "$(FULL_CURRENT_PATH)"</code>
  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). </p>
  
  <p>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. </p>
  
  <p>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.</p>
  
  <p>Some examples of the complaints follow.</p>
  
  <p>My Text Adventure:</p>
  
  <pre><code>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 `&lt;main&gt;'
  
  D:\Programming Stuff\Notepad++&gt;
  </code></pre>
  
  <p>My Gosu Program:</p>
  
  <pre><code>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 `&lt;main&gt;'
  
  D:\Programming Stuff\Notepad++&gt;
  </code></pre>
  
  <p>If anyone could lend any help at all I'd really appreciate it.</p>
  
  <p><strong>Update:</strong> knut's suggestions have allowed me to get what I want after some inconvenient juggling each time I start the program up. There are a few problems. Using </p>
  
  <pre><code>cmd /K "cd "$(CURRENT_DIRECTORY)" &amp;&amp; ruby "$(FULL_CURRENT_PATH)"" 
  </code></pre>
  
  <p>in the default run dialogue does not work. (I get the same complaints as above.) But using NppExec and </p>
  
  <pre><code>cd "$(CURRENT_DIRECTORY)"
  ruby "$(FULL_CURRENT_PATH)"
  </code></pre>
  
  <p>for that works fine, except with my Gosu code, which should draw a window and animate some images, nothing happens. However, if each time I start up Notepad++ I run the NppExec and then use the default run dialogue everything works correctly using the built in run command for that session. Any ideas to why all this occurs and how to prevent it? Also, I'd prefer to have Notepad++ open a Command Prompt window instead of running inside Notepad++ itself, as it does with NppExec. And thank you!</p>
  
  <p><strong>Update2:</strong> It appears that restarting my computer has cleared up the problem, yet now I'm more confused as to what is actually taking place. Is it the NppExec plugin that is actually allowing things to work as I wish, even though I'm using a saved script for the default run dialog? Or Is this a bug, that kept</p>
  
  <pre><code>cmd /K "cd "$(CURRENT_DIRECTORY)" &amp;&amp; ruby "$(FULL_CURRENT_PATH)""
  </code></pre>
  
  <p>from working until I restarted?</p>