• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Problem about ruby searching path in sketchup

Scheduled Pinned Locked Moved Developers' Forum
9 Posts 5 Posters 904 Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    wikii
    last edited by 25 Mar 2014, 15:22

    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

    1 Reply Last reply Reply Quote 0
    • T Offline
      tt_su
      last edited by 25 Mar 2014, 17:39

      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.

      1 Reply Last reply Reply Quote 0
      • B Offline
        Brighter3D
        last edited by 25 Mar 2014, 18:16

        I just ran into the same problem by myself.
        Thanks for explanation.

        1 Reply Last reply Reply Quote 0
        • W Offline
          wikii
          last edited by 25 Mar 2014, 22:51

          @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

          1 Reply Last reply Reply Quote 0
          • T Offline
            tt_su
            last edited by 26 Mar 2014, 12:27

            Me too!
            Sorry for the inconvenience.

            1 Reply Last reply Reply Quote 0
            • K Offline
              ken
              last edited by 26 Mar 2014, 12:33

              @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

              Fight like your the third monkey on Noah's Ark gangway.

              1 Reply Last reply Reply Quote 0
              • W Offline
                wikii
                last edited by 9 Apr 2014, 01:20

                @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".

                1 Reply Last reply Reply Quote 0
                • D Offline
                  Dan Rathbun
                  last edited by 9 Apr 2014, 01:44

                  I've already written a patch, and TIG has updated it twice.

                  See: Re: Sketucation plugin load error

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • W Offline
                    wikii
                    last edited by 9 Apr 2014, 15:31

                    @dan rathbun said:

                    I've already written a patch, and TIG has updated it twice.

                    See: Re: Sketucation plugin load error

                    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?

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    Buy SketchPlus
                    Buy SUbD
                    Buy WrapR
                    Buy eBook
                    Buy Modelur
                    Buy Vertex Tools
                    Buy SketchCuisine
                    Buy FormFonts

                    Advertisement