sketchucation logo sketchucation
    • Login
    1. Home
    2. billbell52
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 7
    • Groups 1

    Topics

    • B

      Getting rdebug-ide working with SU Ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      951 Views
      P
      @billbell52 said: 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. ... From a quick reading, it looks like this is an ide to attach to a Ruby script run from the command line. SketchUp, however, runs scripts from an embedded version of Ruby. Not the command line. So there's no port or process to attach to. Secondly, running the rudebug-ide would not give you access to the SketchUp Ruby extensions embedded inside SketchUp. Eg., If you issue a UI.messagebox() call (or any SketchUp call) from your script loaded by rdebug-ide, it'll just get an "unknown method" error. Third, the SketchUp Console is in control of all Standard in, out, and err I/O streams. Ruby-ide will have to redirect the SketchUp Console I/O to itself, then restore them when it's finished. For MS windows, an alternative might be: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18130 SketchUcation Community Forums • View topic - [plugin] SuRDebug
    • B

      Access Run Ruby Gems and Other Ruby Code From SU Ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      386 Views
      J
      Welcome Bill, The first thing to try is append the $LOAD_PATH from the installed Ruby environment to the SketchUp environment. If you run IRB in your installed Ruby, and enter $LOAD_PATH ($: for short), you might see something like this: ["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", "."] But in SketchUp, the $LOAD_PATH might be something like this: ["C;/Program Files/Google/Google SketchUp 7/Plugins", "C;/Program Files/Google/Google SketchUp 7/Tools", "C;/Program Files/Google/Google SketchUp 7/Plugins/Podium", "C;/Program Files/Google/Google SketchUp 7/Plugins/Podium", "C;/Program Files/Google/Google SketchUp 7/Plugins/ruby"] So in your SketchUp script, append the $LOAD_PATH from the installed Ruby to the $LOAD_PATH in script. # Script.rb $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", "."]) Then see if you can require the needed libraries. You might need to install version 1.8.0 of Ruby because that is what SketchUp uses... although I have been able to copy the msvcrt-ruby118.dll from my installed Ruby to my SketchUp directory without obvious problems. (Rename original first, of course.)
    • B

      Debug Ruby Scripts Using Netbeans

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      671 Views
      Chris FullmerC
      Pecan has made a SketchUp debugger, but I think it works with FreeRiDe (I think?). It sounds like a monumental task to me, but who knows. Maybe your up for the task! Chris EDIT: It uses wxSTEditor, and here's a link to his debugger plugin: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18130&p=147722
    • 1 / 1