The original reason is so that Radiant can be run from the gem or
vendor/radiant. Notice line 17-22 of config/environment.rb. However,
that should not affect plugin paths which are set later on in the file.
However, you may be onto something here.
Sean
Andrew O'Brien wrote:
> IIRC correctly, what Chris is describing is the reason I had to
> explicitly load the rspec and rspec_on_rails plugins in
> config/environments/test.rb. Somewhere along the line (and Chris may
> have identified it), the plugin load paths are getting blown away.
>
> Chris: try adding something like
>
> config.load_paths << "#{RADIANT_ROOT}/vendor/plugins/rspec/lib"
>
> (but the path for your plugin) to config/environment.rb in the
> Radiant::Initializer block.
>
> What was the original reason for clearing out the load_paths? Is it
> something that should be re-examined?
>
> -Andrew
>
> On Dec 4, 2007 4:48 PM, Sean Cribbs <[EMAIL PROTECTED]> wrote:
>
>> It should be loaded. Are you storing it in RAILS_ROOT/vendor/plugins?
>> Have you modified the config.plugin_paths in config/environment.rb?
>>
>> Sean
>>
>>
>> Christopher Zimmermann wrote:
>>
>>> Hello,
>>> Forgive me if this is a stupid or already covered question - i did search on
>>> the radiant site and mailing list, but did not see any conclusive answers.
>>>
>>> In a nutshell:
>>> I see that the path to the plugins lib directory is properly added to
>>> load_paths by railties/initializer.rb load_plugins().
>>> But then the path is completely overwritten in radiant/extension_loader.rb
>>> discover_extensions()
>>>
>>> Context:
>>> I am trying use a regular rails plugin "acts_as_taggable_on_steroids", and
>>> would like to use several others.
>>> I dont need to use it as an extension in Radiant - it will be used elsewhere
>>> in the same application. (My app mixes Radiant with a rails app through the
>>> lovely "radiant_on_rails", "share_layouts, and "record_tags" extensions.)
>>> It is probably possible to create an extension that wraps it - but I would
>>> prefer not too. It's nicest (and easiest) if I can just load existing rails
>>> plugins and also keep them up to date as people release new versions.
>>>
>>> The problem that I am having is that this plugin has several modules in it's
>>> lib directory that cannot be discovered by rails
>>> Dependencies.load_missing_constant because the path has been removed from
>>> the Dependencies.load_paths array by Radiant.
>>>
>>> So when I try to use this Plugin I get a
>>> "
>>> NameError in TesterController#tagtest
>>>
>>> Uninitialized constant
>>> ActiveRecord::Acts::Taggable::InstanceMethods::TagList
>>> "
>>>
>>> Questions:
>>> So, are plugins basically not supported in Radiant?
>>> Is there a reason for that... and is there a reason for totally overwritting
>>> the Dependencies.load_paths array? Or is this something that could be
>>> changed, for example that radiant/extension_loader.rb discover_extensions()
>>> appends the paths to load_paths instead of overwriting it?
>>>
>>>
>>> Thanks for any insight into this!!!
>>> cheers, topher
>>>
>>>
>>>
>>>
>> _______________________________________________
>> 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
>
>
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant