Thanks you Adam, that's what I needed to know. If I can't get a solution to really use only one radiant install, then I'll use this solution.
Jonathan On 5/10/07, Adam Williams <[EMAIL PROTECTED]> wrote: > > On May 10, 2007, at 9:25 AM, Jonathan Métillon wrote: > > > Sean told me that's "partly the point of 'instance mode'. You can > > install the gem system-wide, and only check out the minimum of files > > when you need a new site. Extensions currently have to be installed in > > every instance you create, however." > > > > So is there a way to have the extensions installed one time in one > > place? Like replacing the extensions directory with a symlink to a > > unique place? > > I think you could hack something to work, or create a patch ;_ > > Though I don't know that would be necessary... > > Check out extension_loader.rb, in particular the method > discover_extensions. Notice that configuration.extension_paths is > used to find places to look for extensions. Then, jump over to > initializer.rb - the Radiant one, not the Rails one. Here you will find: > > -------- > class Configuration < Rails::Configuration > attr_accessor :view_paths > attr_accessor :extension_paths > > def initialize > self.view_paths = default_view_paths > self.extension_paths = default_extension_paths > super > end > > def default_view_paths > [view_path].compact > end > > def default_extension_paths > [RADIANT_ROOT + '/vendor/extensions', RAILS_ROOT + '/vendor/ > extensions'].uniq > end > > def admin > AdminUI.instance > end > > end > ------- > > See that the default_extension_paths indicate that extensions may be > loaded from two places, by default. Perhaps you could simply place > your extensions in RAILS_ROOT + '/vendor/extensions', which, if you > are running in instance mode using the Radiant GEM, would be the one > extension location to rule them all. > > I love test driven design... > > --- config/environments/test.rb - 8 --- > config.extension_paths << File.join(File.expand_path > (RADIANT_ROOT), 'test', 'fixtures', 'extensions') > > > aiwilliams > _______________________________________________ > Radiant mailing list > Post: [email protected] > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
