Problem about ruby searching path in sketchup
-
When I install Sketchup in folder on other drive like d:/sketchup2014.
I found the searching path is wrong.$:
["C:/SketchUp 2014/Tools/RubyStdLib", "C:/SketchUp 2014/Tools/RubyStdLib/platform_specific", "D:/SketchUp 2014/Tools", "C:/Users/wikii/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins"]"RubyStdLib" and "platform_specific" direct to

And Encoding.aliases return very few
Encoding.aliases
{"locale"=>"ASCII-8BIT", "external"=>"UTF-8", "filesystem"=>"ASCII-8BIT"}that leads lots of error like
Encoding::Converter.new("GBK", "UTF-8")
Error: #<Encoding::ConverterNotFoundError: code converter not found (GBK to UTF-8)>that is so depressed!
any way?
wikii
-
This is a bug in SU2014 M0 where the load paths will be incorrect if you launch SketchUp via a shortcut or SKP file that is on a drive different from where SketchUp is installed.
There should be a fix in the next release.
Until then the workaround is to launch SketchUp via a shortcut on the same drive SketchUp is installed to.
-
I just ran into the same problem by myself.
Thanks for explanation. -
@tt_su said:
This is a bug in SU2014 M0 where the load paths will be incorrect if you launch SketchUp via a shortcut or SKP file that is on a drive different from where SketchUp is installed.
There should be a fix in the next release.
Until then the workaround is to launch SketchUp via a shortcut on the same drive SketchUp is installed to.
Thank you!
Wish next release come soon.wikii
-
Me too!
Sorry for the inconvenience. -
@tt_su said:
Me too!
Sorry for the inconvenience.You answered my question in another post. I use XnView to find models I wish to insert into others projects. I will from now on, open Sketchup first. This may clear up some problems I have that others don't appear to have.
Thanks for your rely
Ken
-
@tt_su said:
This is a bug in SU2014 M0 where the load paths will be incorrect if you launch SketchUp via a shortcut or SKP file that is on a drive different from where SketchUp is installed.
There should be a fix in the next release.
Until then the workaround is to launch SketchUp via a shortcut on the same drive SketchUp is installed to.
I want to write a patch in ruby to solve the problem.
I put path.rb in Sketchup tools folder.path.rb
drive=$;.clone.delete_if{|x| !(x=~/Tools$/)}[0][0] path=$;.clone $;.clean path.each{|x| if x=~Regexp.new("C;/SketchUp 2014/Tools/RubyStdLib") or x=~Regexp.new("C;/SketchUp 2014/Tools/RubyStdLib/platform_specific") $;.push x.gsub(/^C/,drive) else $;.push x end }But it seems too late.
But it seems Sketchup has missed launching something before loading "path.rb". -
I've already written a patch, and TIG has updated it twice.
-
@dan rathbun said:
I've already written a patch, and TIG has updated it twice.
Thank you!
I use the patch,but there is still different.
when sketchup install in drive c,and start with shortcut in desktop
Encoding.find("locale") #<Encoding;GBK>when sketchup install in drive c,puts the patch file in tools folder,then start sketchup with shortcut in desktop
Encoding.find("locale") #<Encoding;ASCII-8BIT>This different will lead some error if filename uesed some Chinese character.
The patch file is still missing something?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement