• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

MR2 broke plugin during C extension require

Scheduled Pinned Locked Moved Developers' Forum
51 Posts 4 Posters 798 Views
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.
  • D Offline
    draftomatic
    last edited by 15 Jan 2012, 03:40

    Before MR2 I was able to load the standard C extensions that we are distributing with our installation. I use some rubygems that require openssl.so , for example.

    After upgrading I'm getting an error:

    load "Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so" Error: #<SyntaxError: (eval):0:inload': C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so:1: Invalid char \220' in expression>

    Was the Ruby interpreter updated for this release (1.8.6 patch level on Windows)? It seems to be having trouble reading the libraries.

    1 Reply Last reply Reply Quote 0
    • D Offline
      draftomatic
      last edited by 15 Jan 2012, 03:55

      Hmm, doesn't look like it was.

      RUBY_VERSION 1.8.6 RUBY_PATCHLEVEL 287

      Actually I just upgraded my laptop's SU, which is XP and it's loading. I have tested it on 2 Vista computers (one of which worked before MR2, and the other I did a totally fresh installation of SU and the plugin) and both are broken.

      1 Reply Last reply Reply Quote 0
      • D Offline
        draftomatic
        last edited by 15 Jan 2012, 04:14

        Ah, so I needed to leave off the ".so" part of the path.

        So that was the problem using loadin the Ruby console, but now the file is not found (which actually is the error I was having originally but then I started getting the other one in the console).

        Getting this error now:

        Error Loading File light_stanza_extension.rb 126: The specified module could not be found. - C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so

        I attached a screenshot as proof the file does exist in the correct folder and that my load paths are correct.


        openssl not found.PNG

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 15 Jan 2012, 05:03

          Let's see the light_stanza_extension.rb file, please.

          Does it use a path with backslashes, or forward slashes ??

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dan Rathbun
            last edited by 15 Jan 2012, 05:07

            It does not matter (at console or in script,) if you have the proper paths in the $LOAD_PATH array, then use

            require('openssl')

            instead of:

            load "Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so"

            BTW: the "\220" char is the backslash, aka the method call: 220.chr()

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • D Offline
              draftomatic
              last edited by 15 Jan 2012, 05:07

              @dan rathbun said:

              Let's see the light_stanza_extension.rb file, please.

              Does it use a path with backslashes, or forward slashes ??

              The error is only showing that file because it's the entry point for the plugin. I'm not requiring anything in that file, and certainly not openssl.so .

              It's nested several requires later, when I require the RestClient library, which is a 3rd-party library which itself includes openssl.

              1 Reply Last reply Reply Quote 0
              • D Offline
                draftomatic
                last edited by 15 Jan 2012, 05:10

                @dan rathbun said:

                require('openssl')

                This gives the same error.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  draftomatic
                  last edited by 15 Jan 2012, 05:13

                  Hmm well I just reinstalled SketchUp to this version:

                  http://www.filehippo.com/download_google_sketchup/8248/

                  And it still can't find openssl.so

                  So perhaps it's not a problem with MR2...

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dan Rathbun
                    last edited by 15 Jan 2012, 05:14

                    You could try:

                    Sketchup.require('openssl')
                    or
                    Sketchup.require('openssl.so')

                    it's a modified version of the Kernel.require method.

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      Dan Rathbun
                      last edited by 15 Jan 2012, 05:15

                      By the way.. what are the green checkmarks over the folder icons mean ?

                      I'm not here much anymore.

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        draftomatic
                        last edited by 15 Jan 2012, 05:19

                        @dan rathbun said:

                        By the way.. what are the green checkmarks over the folder icons mean ?

                        It's TortoiseSVN (I use SVN for version control). It doesn't modify the files and has never been a problem in over 200 revisions.

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          draftomatic
                          last edited by 15 Jan 2012, 05:22

                          require('openssl') Error: #<LoadError: C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so: 126: The specified module could not be found. - C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so> (eval) C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/openssl.rb:17 (eval):0:inrequire'
                          (eval):0
                          Sketchup.require('openssl')
                          false`

                          Interesting... does that mean anything to you? The latter returned false. Was it successful or no?

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            Dan Rathbun
                            last edited by 15 Jan 2012, 05:24

                            It seems like TIG reported problems with access to Vista (64bit) folders during the last beta round, concerning the new rbz installer, but I thot the issue was resolved.

                            Check file permissions on the folders.

                            I'm not here much anymore.

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              Dan Rathbun
                              last edited by 15 Jan 2012, 05:29

                              @draftomatic said:

                              Sketchup.require('openssl')
                              false[/ruby]

                              Interesting... does that mean anything to you? The latter returned false. Was it successful or no?

                              It means (to me,) that [ruby:2l6gl0ii]Sketchup.require[/ruby:2l6gl0ii] still does not work as it should (rubywise.)

                              [ruby:2l6gl0ii]require[/ruby:2l6gl0ii] is supposed to return [ruby:2l6gl0ii]true[/ruby:2l6gl0ii] if the load was successful, [ruby:2l6gl0ii]false[/ruby:2l6gl0ii] if the file has ALREADY been loaded, and raise a [ruby:2l6gl0ii]LoadError[/ruby:2l6gl0ii] (or other,) exception otherwise.

                              Previous to the last MR, I had filed a bugreport on [ruby:2l6gl0ii]Sketchup.require[/ruby:2l6gl0ii] for various reasons, but one issue was that it was returning numerical error codes (which is a C thing, not a the Ruby way.)

                              I'm not here much anymore.

                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                draftomatic
                                last edited by 15 Jan 2012, 05:31

                                Thanks Dan.

                                So, per your suggestion, I started going through the libraries that require 'openssl' and replacing it with Sketchup.require 'openssl'

                                It seemed to fixed one after the other, until I got this:

                                Error Loading File C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so 126: The specified module could not be found. - C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/Light Stanza/lib/Ruby186/lib/ruby/1.8/i386-mswin32/openssl.so

                                Sorry, had a copy/paste error a second ago. Fixed it.

                                1 Reply Last reply Reply Quote 0
                                • D Offline
                                  Dan Rathbun
                                  last edited by 15 Jan 2012, 05:34

                                  Oh I REMEMBER what the problem is !!!!

                                  It Windows and how it handles custom icons for folders. When you change the icon for a folder, Windows sets it's read-only attribute (or similar.)
                                  This messes up Ruby.

                                  It's your Tortoise install changing the icons that is causing the problem.

                                  TIG is the one that figured this out during beta.

                                  I'm not here much anymore.

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    draftomatic
                                    last edited by 15 Jan 2012, 05:38

                                    @dan rathbun said:

                                    It's your Tortoise install changing the icons that is causing the problem.

                                    Eh, I don't think so. We also have a packaged installer that does not include any of the svn data. In fact I just stripped my plugin from the Plugins folder and used the installer, and still getting the same errors...

                                    1 Reply Last reply Reply Quote 0
                                    • D Offline
                                      draftomatic
                                      last edited by 15 Jan 2012, 05:45

                                      @dan rathbun said:

                                      It seems like TIG reported problems with access to Vista (64bit) folders during the last beta round, concerning the new rbz installer, but I thot the issue was resolved.

                                      Check file permissions on the folders.

                                      I don't suppose you have any references for this?

                                      Scott Lininger promised to get me into the next beta last time I met with him; unfortunately that doesn't help me today ๐Ÿ˜ƒ

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        Dan Rathbun
                                        last edited by 15 Jan 2012, 05:46

                                        If you copy the icon modified folders into the install package, they will have the modified flags. TIG had to completely recreate new default folders, and copy the files into the new folders.

                                        REALLY I am not making this up. It's a really stupid thing that Microsoft did.

                                        I'm not here much anymore.

                                        1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          Dan Rathbun
                                          last edited by 15 Jan 2012, 05:47

                                          @draftomatic said:

                                          @dan rathbun said:

                                          It seems like TIG reported problems with access to Vista (64bit) folders during the last beta round, concerning the new rbz installer, but I thot the issue was resolved.

                                          Check file permissions on the folders.

                                          I don't suppose you have any references for this?

                                          Scott Lininger promised to get me into the next beta last time I met with him; unfortunately that doesn't help me today ๐Ÿ˜ƒ

                                          Give me hour or so. I'll see what I can send you from the thread in the beta forum.

                                          I'm not here much anymore.

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

                                          Advertisement