After a long lapse, I’m trying to write a new plugin, and amend an old one.
Following an old post I got NetBeans installed some years ago, but with difficulty. And haven’t used it for at least a year or more since.
when I first started NetBeans tonight, it listed three plugin files I’d worked on in the past. But then they disappeared and I can’t find a way to reopen them.
But when I try to start a new project, it says that one of the Ruby versions installed is corrupt or not working - v2.3.7 something.(The other is v1.7x, which is roughly what older versions of SU used). I did as the error message suggested, and went to the NetBeans menu item Tools/Ruby Platform to fix it.
It’s now apparently updated and installed correctly, as
Ruby 2.3.7 (2018-03-28 patchlevel 456) [universal.x86_64-darwin18]
This isn’t the Ruby built in to Sketchup, which it hasn’t located, although SU 2020 is open, with a model loaded, and the Ruby console open too. When I run (from NetBeans) a short piece of test code to create an InputBox in SU, I get the output
/.../main.rb:7:in `<main>': undefined method `feet' for 14:Fixnum (NoMethodError)
which looks to my inexpert eye that it hasn’t understood something that’s common in SU Ruby, but not standard Ruby, how to convert from feet to inches. It is correctly referring to the location of the file I just created.
Any idea how I can point NetBeans to the SU Ruby version?
Or do i have to copy the code from the NetBeans window to the Ruby console to run it?
When I do that, the code runs and opens an InputBox, but dimensions that should be in feet are showing in inches (so what should display as 14’ shows as 168", and so on for other dimensions in the InputBox.)
I searched in Finder for ‘Ruby’ and found entries in the Application Support folder for SU2020, within the ~/Library parent folder, in the Sketchup install log (which I can’t find again now!) suggesting Ruby v2.5.5 framework(s) are installed within the SU Application Support files in ~/Library… something.
But there were multiple entries, all looking very similar, so I don’t know which if any of those I found, to try to point NetBeans to use.
Maybe I just need to re-read the old thread, and work it out from scratch again, but if anyone knows of a shortcut to that, I’d be grateful.