Debugger/DebuggerInterfaceRuby.py

branch
5_4_x
changeset 3355
e0f9ccad12da
parent 3160
209a07d7e401
diff -r 0e9164fc1a17 -r e0f9ccad12da Debugger/DebuggerInterfaceRuby.py
--- a/Debugger/DebuggerInterfaceRuby.py	Sun Mar 09 18:15:47 2014 +0100
+++ b/Debugger/DebuggerInterfaceRuby.py	Tue Mar 11 18:55:08 2014 +0100
@@ -39,7 +39,10 @@
     @return list of the following data. Client type (string), client
         capabilities (integer), client type association (list of strings)
     """
-    return ["Ruby", ClientDefaultCapabilities, ClientTypeAssociations]
+    if Preferences.getDebugger("RubyInterpreter"):
+        return ["Ruby", ClientDefaultCapabilities, ClientTypeAssociations]
+    else:
+        return ["", 0, []]
 
 
 class DebuggerInterfaceRuby(QObject):
@@ -143,7 +146,11 @@
         """
         interpreter = Preferences.getDebugger("RubyInterpreter")
         if interpreter == "":
-            interpreter = "/usr/bin/ruby"
+            E5MessageBox.critical(
+                None,
+                self.tr("Start Debugger"),
+                self.tr("""<p>No Ruby interpreter configured.</p>"""))
+            return None, False
         debugClient = os.path.join(
             getConfig('ericDir'), "DebugClients", "Ruby", "DebugClient.rb")
         

eric ide

mercurial