• Login
sketchucation logo sketchucation
  • Login
🤑 30% Off | Artisan 2 on sale until April 30th Buy Now

What are the rules for location of rubies on a Mac?

Scheduled Pinned Locked Moved Developers' Forum
13 Posts 5 Posters 934 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.
  • B Offline
    Bob James
    last edited by Bob James 4 Aug 2009, 19:01

    To work correctly, some rubies like BezierSpline 1.2, ProfileBuilder, Podium, Projection, SCF Power Toolbar, Layer Manager 2.1 and probably more, must be loaded into:

    HD/Users/robertjames/Library/Application Support/Google SketchUp 7/SketchUp/Plugins

    instead of the standard location:

    HD/Library/Application Support/Google SketchUp 7/SketchUp/Plugins

    What are the rules for location of rubies on a Mac?

    Edit: Add BoolTools to the list.

    i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

    1 Reply Last reply Reply Quote 0
    • C Offline
      Coronel
      last edited by 5 Aug 2009, 01:26

      I have most of them in my user library excepting those which use an installer and choose the general library folder. I just had a problem (not solved yet) with 3skenglt pipping plugin.
      Some plugs may install a folder or component on a specific location outside of the library.

      1 Reply Last reply Reply Quote 0
      • F Offline
        fredo6
        last edited by 5 Aug 2009, 07:03

        It would be useful if some Mac users could report the value of the global variable indicating the loading paths of Ruby scripts.

        In the Ruby console, just type $:.

        We could then see if the 2 locations, 'user' and 'mac' are defined in the path, and in which order.

        Fredo

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 5 Aug 2009, 07:12

          Maybe also note what OSX version. Maybe 10.4 and 10.5 differs.

          I can test on an old 10.4 system when I get home.

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

          1 Reply Last reply Reply Quote 0
          • C Offline
            Coronel
            last edited by 5 Aug 2009, 23:38

            The console doesn't work, so I threw a bag of snacks on the table and the oracle said:

            $:
            ["/Users/Coronel/Library/Application Support/Google SketchUp 7/SketchUp/Plugins", "/Library/Application Support/Google SketchUp 7/SketchUp/Plugins", "/Library/Application Support/Google SketchUp 7/SketchUp/Tools", "/Users/Coronel/Library/Application Support/Google SketchUp 7/SketchUp/Plugins/ruby", "/Users/Coronel"]

            1 Reply Last reply Reply Quote 0
            • B Offline
              Bob James
              last edited by 6 Aug 2009, 03:25

              ["/Users/robertjames/Library/Application Support/Google SketchUp 7/SketchUp/Plugins",
              "/Library/Application Support/Google SketchUp 7/SketchUp/Plugins",
              "/Library/Application Support/Google SketchUp 7/SketchUp/Tools",
              "/Users/robertjames/Library/Application Support/Google SketchUp 7/SketchUp/plugins/Podium.bundle/Contents/MacOS",
              "/Users/robertjames/Library/Application Support/Google SketchUp 7/SketchUp/plugins/Podium.bundle/Contents/Resources", "/Users/robertjames"]

              i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

              1 Reply Last reply Reply Quote 0
              • C Offline
                Chris Fullmer
                last edited by 6 Aug 2009, 05:11

                This might be waaaay off, but my understanding is that the library directory is what windows base their "compatibility folders" off of. It is a separate folder that lies outside the main installation location of the software, thus keeping user installed content separate from the actual software installation.

                But SU's default seems to be to install everything directly into the actual plugins folder.

                Does that sound like it might possibly be right?

                Chris

                Lately you've been tan, suspicious for the winter.
                All my Plugins I've written

                1 Reply Last reply Reply Quote 0
                • F Offline
                  fredo6
                  last edited by 6 Aug 2009, 08:04

                  It looks like SU on Mac is looking into the 2 plugin directories, 'User' first and then 'Application Support'.
                  Which may be the source of potential conflicts if some files are installed in 'user' folder while other part of the script are in 'Application support', keeping in mind that the statement require "some_file.rb" will only keep track on the base file name, wherever found, and won't reload it from another place.

                  This may become a problem for instance if you installed a first version of a script in 'User', and then an upgrade of the same script in 'Application Support'

                  The best for Mac users is maybe to select one directory for their scripts, and then do a clean up to make sure that all scripts are in this directory, and not in the other one.

                  Fredo

                  1 Reply Last reply Reply Quote 0
                  • F Offline
                    fredo6
                    last edited by 7 Aug 2009, 13:03

                    Bob,

                    Could you also report the result of Sketchup.find_support_file "Plugins", when typed in the Ruby console.

                    If there are two places for loading script, it's good to know what SU considers as its 'main' one.

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      Bob James
                      last edited by 7 Aug 2009, 19:45

                      Sketchup.find_support_file "Plugins"
                      /Users/jamesb/Library/Application Support/Google SketchUp 7/SketchUp/Plugins

                      Apparently it looks first at the Users/jamesb/Library.... rather than HD/Library.... Interesting!

                      i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        Bob James
                        last edited by 7 Aug 2009, 19:50

                        @unknownuser said:

                        It looks like SU on Mac is looking into the 2 plugin directories, 'User' first and then 'Application Support'.
                        Fredo

                        Rubies are always put into the "application support" folder:

                        It's just that sometimes they work in the
                        users/account/library/application support/GoogleSketchup 7/Sketchup/plugins

                        and others in the
                        HD/library/application support/GoogleSketchup 7/Sketchup/plugins

                        i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

                        1 Reply Last reply Reply Quote 0
                        • F Offline
                          fredo6
                          last edited by 8 Aug 2009, 07:21

                          @bob james said:

                          Sketchup.find_support_file "Plugins"
                          /Users/jamesb/Library/Application Support/Google SketchUp 7/SketchUp/Plugins

                          Apparently it looks first at the Users/jamesb/Library.... rather than HD/Library.... Interesting!

                          It is common practice in Ruby scripting to get the Plugins directory using Sketchup.find_support_file "Plugins" as the base folder for looking for other files or create new ones.

                          So, it would mean that most scripts would work if installed in 'User' mode, whereas those relying on the absolute path of the Plugins directory may not work if installed in the 'Application Support' directory.

                          Fredo

                          PS: Normally, my scripts using LibFredo6 only use the relative path to LibFredo6.rb, wherever this file is loaded from (as a consequence, you'll get problem if you installed LibFredo6 in 'User' and FredoScale in 'Application Support' for instance.

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            Coronel
                            last edited by 12 Jan 2010, 01:57

                            I'm not ruby programmer but some installers require you a specific directory. May be the loader expects to find some things on a specific placement.

                            As you know we can get several user accounts with the same directory structure and SU will search for plugins in a determinate order (I read it somewhere). I'm not sure but it could be in the plugins folder inside SU application, then the general library, shared library, user library, and so on.

                            I just collected all of them in my user account/library/application support/GoogleSketchup 7/Sketchup/plugins. All excepting those that are using an installer but probably most of them would work the same.

                            Finally, I don't understand why some rubys needs another location to work.

                            Some problems may need file permissions verification (I tried all possibilities with pipping plugin without success.

                            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