Ruby Code Editor plugin doesn't work



I used the Ruby Code Editor from alexschreyer for serval months with no problem.
But it doesn’t start anymore since today.

The Ruby Console shows the following code:

Error: ArgumentError: invalid byte sequence in UTF-8
C:/Users/******/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:225:in split
C:/Users/******/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:225:in initialize
C:/Users/******/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:522:in new
C:/Users/******/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:522:in block in <top (required)>
SketchUp:1:in call

How can I fix this problem?


Please edit your post and surround the error listing with lines containing triple backticks. That prevents the forum from formatting the text and dropping the actual error message .


Just a guess but it would appear that the last snippet file saved has an invalid character in the name.

Use the following in the RubyConsole to clear it

Sketchup.write_default “as_RubyCodeEditor”, “last_file”, “”


Thank you @sdmitch. I was with a similar problem and this code solved it. :heart_eyes:

This is not related to your problem @nnijmeijer but take this situation for upgrade some links that don’t work on Reference Browser, like:

Trimble API Reference: --> line 194 from the file as_rubyeditor/ui.html
Trimble - Geometry Tutorial: link is missing --> line 195 from the file as_rubyeditor/ui.html
SketchUp API Cheatsheet (PDF): link is missing --> line 196 from the file as_rubyeditor/ui.html


Thank you! This code solved the problem.


Give the update a try:


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.