Ruby Code Editor plugin doesn't work

error
sketchup
ruby
plugin

#1

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?


#2

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 .


#3

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”, “”


#4

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: http://ruby.sketchup.com/ --> 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


#5

Thank you! This code solved the problem.


#6

Give the update a try:


#7

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