What are the rules for location of rubies on a Mac?
-
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.
-
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"] -
["/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"] -
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
-
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 statementrequire "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
-
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.
-
Sketchup.find_support_file "Plugins"
/Users/jamesb/Library/Application Support/Google SketchUp 7/SketchUp/PluginsApparently it looks first at the Users/jamesb/Library.... rather than HD/Library.... Interesting!
-
@unknownuser said:
It looks like SU on Mac is looking into the 2 plugin directories, 'User' first and then 'Application Support'.
FredoRubies 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/pluginsand others in the
HD/library/application support/GoogleSketchup 7/Sketchup/plugins -
@bob james said:
Sketchup.find_support_file "Plugins"
/Users/jamesb/Library/Application Support/Google SketchUp 7/SketchUp/PluginsApparently 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.
-
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.
Advertisement