Presuming that you have a copy of Rails in your /vendor....
Each plugin''s init.rb file is ultimated invoked by the
''load_plugin''
method in vendor/rails/railties/lib/initializer.rb. This is invoked
each time your config/environment.rb is read (i.e. each time the
server starts).
The code which calls install.rb is in
vendor/rails/railties/lib/commands/plugin.rb (see
Plugin#run_install_hook), and is only evaluated when you install a
plugin via the script/plugin command.
There are no environment variables which influence the loading of
plugins - any file called ''init.rb'' which is in a subdirectory
of
/vendor/plugins *should* be evaluated.
Shameless plug: my short cut e-book "Rails Plugins" might be of some
assistance - it''ll be available in the next week or so, via
http://www.informit.com/bookstore/product.asp?isbn=0321483510&rl=1
- james
On 9/4/06, DocPneumo <mckuppinger-SJAMHueKgk4AvxtiuMwx3w@public.gmane.org>
wrote:>
> Can anyone point me to the code that calls init.rb in a plugin?
> install.rb? the code in tasks?
>
> I have installed several plugins but find that they never seem to be
> initialized. I like poking around in code but can''t seem to find
the
> code that actually calls init.rb. Nothing I''ve found on the web
seems
> to address this.
>
> It occurs to me that there may be an environment variable that needs to
> be set to bring in plugins. Any thoughts? Information concerning
> plugins seems very limited. I haven''t yet found any information
about
> what is going on in the background to make them work.
>
> Thanks.
> DocPneumo
> 9/4
>
>
> >
>
--
* J *
~
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---