# Disaster! Dave, please bail me out!



## Steve Maskery (22 May 2006)

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:






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






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

Cheers
Steve


----------



## Shady (22 May 2006)

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


----------



## SketchUp Guru (22 May 2006)

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

Just kidding. 

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?


----------



## Steve Maskery (22 May 2006)

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


----------



## SketchUp Guru (22 May 2006)

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.


----------



## Steve Maskery (22 May 2006)

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


----------



## SketchUp Guru (22 May 2006)

Oh good. You can forget reformatting your HD, then.


----------



## Nick W (22 May 2006)

Nah, go on Dave, make him reformat :wink: :twisted:


----------



## SketchUp Guru (22 May 2006)

Steve, so far it's two for and one against.


----------



## Steve Maskery (22 May 2006)

Ah, but I will always have the casting vote!


----------



## Newbie_Neil (22 May 2006)

Hi Steve

I'll help you settle this discussion. You must re-format. :twisted: 

Cheers
Neil


----------



## RogerS (22 May 2006)

Yup, Steve. Definitely re-format. Just think how fast it will run and how much extra storage space you'll have. :lol:


----------



## SketchUp Guru (22 May 2006)

Steve, things are looking like a reformat is in your future. Sorry about that. I hope you aren't too angry with me.


----------



## Steve Maskery (22 May 2006)

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


----------



## Paul Chapman (22 May 2006)

:shock: Blimey, I think I'll stick to my pencil and the back of a fag packet :wink: 

Paul


----------



## Neomorph (23 May 2006)

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.


----------

