
First, it's ugly to have to have a separate process devoted to closing Sketchup windows. Having a separate process continuously running that closes Google Sketchup windows using AppleScript when signaled is clumsy for a number of reasons. However, when I try to require drb within SketchUp, I get the following message:Įrror: LoadError: (eval):5:in 'require': no such file to load - drb To do this interprocess communication, I tried using drb. When the slave is finished, it signals the master, and the master closes the SketchUp file. The slave will run within the Google SketchUp program while the master waits. Have a master script that launches a slave script to process each model. However, when I execute any of these commands from an IRB or directly from the Bash prompt outside of SketchUp, I get the desired behavior: the model window closes (incidentally, the Ruby console window remains open, which is fine). Whenever I try this second approach, SketchUp just freezes. That is, I call out to the shell from SketchUp's Ruby console window using one of the following:

In a similar vein, I am trying to use osascript (a bash program that executes AppleScripts from the shell) to close the window. The problem here is that I cannot get SketchUp to recognize my installed gems.

The Ruby API to Google SketchUp has a function, open_file, but I can't find a close_file function.
