sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Iconv.so dependency fails

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 4 Posters 791 Views 4 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.
    • D Offline
      debracey
      last edited by

      Hello folks,

      I've written a sketchup plugin which uses JSON to pass data back and forth between a web dialog and the plugin. Everything works great on my development machine (which also runs a Ruby 1.8.6 dev env) -- but when I go to install the plugin on a clean machine, it fails to load with the following error:

      @unknownuser said:

      Error Loading File configexporttool.rb
      126: The specified module could not be found. - C:/Program Files (x86)/Google/Google SketchUp 8/Tools/iconv.soError Loading File json.rb
      126: The specified module could not be found. - C:/Program Files (x86)/Google/Google SketchUp 8/Tools/iconv.so

      If I navigate to the tools folder, iconv.so is sitting there -- so I'm not sure what's going on. I used dependency walker to check iconv.so to make sure I wasn't missing any dependencies, and found that MSVCRT-RUBY18.DLL was required. I placed that file in the tools folder and that cleared the dependency problem, but I still get that error on startup.

      Any ideas?

      Thanks, Dan

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        1) Yes.. the "Tools" folder belongs to Google/Trimble.
        Anything you place in there, can be removed by the installer / updater.
        Stay out of that directory.

        2) The "msvcrt-ruby18.dll" IS the Ruby interpreter, which IS loaded and running. A copy distro's with SketchUp, and resides in the application directory along with "sketchup.exe".
        If it wasn't already loaded and running, then how could the Ruby require() method be called and raise the exception you are seeing ??

        3) It's best to just install a Full Ruby library, using the "one-click" installer, and leave the Ruby libraries in there normal place, where they can be maintained via RubyGems, etc.
        Pickin' and choosing more than the Win32API.so, or win32ole.so library files, and copying them to "Plugins", is a bad idea. "so" (source object) files do not carry version information, like DLL files. So when you take them out of a versioned folder system, we can no longer tell what version they are.

        Do yourself a favor, and just install Ruby on both machines, and use a script like my "loadpaths" script, to add paths into $LOAD_PATH, to the normal Ruby library folders.

        See my post: [ Code ] Ruby LOAD PATHs script (Win32) : ver 3.0.1

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          @dan rathbun said:

          1. Yes.. the "Tools" folder belongs to Google/Trimble.
            Anything you place in there, can be removed by the installer / updater.
            Stay out of that directory.

          +1

          SketchUp documentation explicitly mentions Plugins as the folder to use.
          https://developers.google.com/sketchup/docs/loading

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            Also.. I think that "iconv.so" is one of those library files, that is extremely cranky about the having all loaded libraries be version matching.

            In addition, the system must have the proper version of the Microsoft VC runtime installed. I think for Ruby v1.8.6-p287, that would the 2005 runtime?

            So you cannot just take the "iconv.so" from say, v1.8.7-p299 and expect it to load into Ruby 1.8.6-p287.

            Once you have all the "version" ducks in a row, load "iconv.so" by calling it via require, with no file extension, ie:

            require("iconv")

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • D Offline
              debracey
              last edited by

              Thanks for the tips,

              Unfortunately I cannot simply package a Ruby distribution, so I'm sorta stuck here. I really don't need iconv at all for what I want to do -- so I just did a grep on all my dependencies and removed the references to iconv, that seems to have resolved the problem. (Not exactly the best solution, but it'll work for what I need.)

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                @debracey said:

                Unfortunately I cannot simply package a Ruby distribution, so I'm sorta stuck here.

                We really don't want that either. Normally, you just list a full Ruby install, as a requirement, and give the link to the Windows One-Click Installer (as I did in my Load Paths topic.) Then you use a script like mine, or in yours check that $LOAD_PATH contains paths to the standard Ruby lib directories.

                @debracey said:

                I really don't need iconv at all for what I want to do -- ...

                If it's Unicode file paths you are worried about, TIG posted a beta called PCFileTools. They don't seem to be a problem on the Mac.

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • N Offline
                  nikus_knx
                  last edited by

                  Hey I get the same problem,
                  Just copy iconv.dll from C:\Ruby\bin in the directory C:\Program Files (x86)\Google\Google SketchUp 8 to fix the problem.

                  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