Disaster! Dave, please bail me out!

UKworkshop.co.uk

Help Support UKworkshop.co.uk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,795
Reaction score
156
Location
Kirkby-in-Ashfield
Hi all, especially Dave :)

Whilst hunting for a Ruby script or two, I found a Zip file with them all in em_all_scripts.zip. So I downloaded and unzipped and now, when I start up:
loaderrors.jpg


and my context menu is huge and most of it greyed out.

context.jpg


I know I could just go through and remove all the rb scripts, but I'd rather solve the problem.

Cheers
Steve
 
Steve - it looks as though the ones reading 'no such file to load' aren't seeing the ruby scripts (eg files with that name, and the extension .rb)

I would unzip all again to a separate file, and then, one by one, transfer the missing scripts into your sktchup scripts file, making sure that windows sees them with the correct extension - it may have messed with them on extraction.

HTH
 
Steve. you're out of luck. You'll have to reformat your hard drive.

Just kidding. :D

I'm no Ruby expert but I figured this one out awhile ago. It's a simple fix but a little tedious. You'll need to edit the scripts that won't load.

Use NotePad or WordPad to open crate.rb. skim through it to find the line that says, "require./offset.rb" and delete the slash. Save the file with the rb extension again.

Do the same for flightpathtool.rb

The same basic thing applies to make_triangle.rb only you're going to delete the / before delauney. And again for paramemtric_grid.rb eliminate the / before parametric.rb

I suppose there are more that don't show in your screen shot of the script panel.

Also it looks like you're missing a few scripts. You'll need to add those to the Plugins folder. From what I can see you need linetool.rb and maybe bomb.rb. Actually I think you'll need to check make_triangle.rb. It is looking for bomb.rb in a folder called Scripts which would normally be made automatically if you extract the zip file contents correctly. There are some other ruby scripts that make use of a Scripts folder so you might as well have it. Theoretically you could edit out "Scripts/" and have bomb.rb in the Plugins folder.

Does that make sense?
 
Thanks guys, very helpful (well, apart from the heart-attack-inducing rise...:) )

I've edited the scripts - actually, Dave, I had to remove the ./ and not just the / , just in case anyone else reading this has to do the same. Also I edited the Scripts/ out of the code, too, so that all my rb files were in the Plugins directory. All is now well (on loading) except for:

Error Loading File make_triangle.rb
No such file or directory - points.txt
Error Loading File stair_maker062.rb
undefined method `add_item' for nil:NilClass

I can't find a points.txt on my system, so I assume that either
a) it is created dynamically somehow, or
b) it just isn't included in the script

I'm also happy to strip out the stairmaker script altogether if necessary.

My biggest worry now is the cocked-up context menu. That is still largely greyed out. Make Group, Make Component etc simply are not pickable. That's rather more disturbing.

Cheers
Steve
 
I would be asking about that on the SketchUp Ruby forum because that doesn't sound right. Some script must be interfering with the context menu but I don't know which one.

Sorry about missing the '.' in my instructions. It's still early here and my coffee has yet to kick ini.
 
Good idea. I didn't even have to ask, a search revealed the answer. The culprit is suapi.rb. Remove that and all is well.

Thanks for the help guys, very much appreciated, as ever.

Cheers
Steve
 
Shan't, shan't, shan't. Stamp my foot.

Actually there are still a couple of weird things happening. If I right-click on a component, there are 3 diagnostic error messages which appear one at a time before the context menu appears.

The context is huge now. I have to scroll up and down, it won't all fit on the page. Some of the entries are in more than once. What a mess.

Moral of the story, only install what you really need.

Cheers
Steve
 
The dot means it was looking for a directory parent so if the ruby script was in c:\here\there then it would be looking at c:\here if you didn't know.

Memories of DOS there heh.

On the topic of Ruby scripting there is an article on it in this months PC Pro if you are interested.
 

Latest posts

Back
Top