freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR-devel] ScriptRunner change


From: David Naseby
Subject: [FR-devel] ScriptRunner change
Date: Wed, 30 Apr 2003 09:46:19 +1000

Been having some problems with scriptrunner on Windows. Ruby is executed
from the current directory, meaning my require paths to local directories
are botched. This is unexpected behaviour for me at least.

To amend it, I made the following change to
rubyide_tools_fox_script_runner/script_runner.rb:
line 39:unless editpane.modified?
          file = plugin["/system/ui/current/EditPane"].data
+          current_directory = Dir.getwd
+          Dir.chdir( File.dirname( file ) )
          result = `ruby "#{file}" 2>&1`
+          Dir.chdir( current_directory )
          plugin["/system/ui/current/OutputPane"].manager.append("Run",
"<CMD>>ruby #{file}\n")
          plugin["/system/ui/current/OutputPane"].manager.append("Run",
result)
          plugin["/system/ui/current/OutputPane"].manager.append("Run",
"<CMD>>exit\n")
        end

David Naseby




reply via email to

[Prev in Thread] Current Thread [Next in Thread]