I am on this quest to get Netbeans IDE working with SU Ruby. The development version of Netbeans has a capability to attach a debugger to a Ruby process. See link below:
http://blogs.sun.com/martink/entry/remote_debugging_debug_whatever_ruby
This works awesome on regular Ruby programs. So I thought I would muddle my way through trying to get it to work with SU Ruby. I have a regular ruby 1.8.6 install. Steps so far:
- Created init.rb and put it in plugins dir. This is a one line Ruby program to add a regular Ruby install paths to the SU loadpath.
$LOAD_PATH.concat([".","c:/ruby/lib/ruby/site_ruby/1.8","c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt","c:/ruby/lib/ruby/site_ruby","c:/ruby/lib/ruby/1.8","c:/ruby/lib/ruby/1.8/i386-mswin32"])
-
Made sure I have the latest rubygems and rdebug-ide. Copied over the c:\ruby\bin\rdebug-ide to ..\plugins\debug\rdebug-ide.rb
-
Started SU Ruby console and did a require 'debug/rdebug-ide'. Got this error
require 'debug/rdebug-ide'
Error: #<NoMethodError: undefined method sync=' for #<Sketchup::Console:0x342ed90>> (eval) C:/Program Files/Google/Google SketchUp 7/Plugins/debug/rdebug-ide.rb:19:in
load'
C:/Program Files/Google/Google SketchUp 7/Plugins/debug/rdebug-ide.rb:19
(eval):0:in `require'
(eval):0
If I look at loadpath it seems to contain all the required paths. Any ideas on how to get this working.
$:
["C:/Program Files/Google/Google SketchUp 7/Plugins", "C:/Program Files/Google/Google SketchUp 7/Tools", ".", "c:/ruby/lib/ruby/gems/1.8/gems/linecache-0.43-x86-mswin32/bin", "c:/ruby/lib/ruby/gems/1.8/gems/linecache-0.43-x86-mswin32/lib", "c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3-x86-mswin32/bin", "c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3-x86-mswin32/lib", "c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.5/bin", "c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.5/lib", "c:/ruby/lib/ruby/site_ruby/1.8", "c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt", "c:/ruby/lib/ruby/site_ruby", "c:/ruby/lib/ruby/1.8", "c:/ruby/lib/ruby/1.8/i386-mswin32"]