xonmac
2007-Sep-21 10:11 UTC
Initialization: where does Rails ''require'' its plugins'' lib/ files?
Hi guys, Can someone point out, where, during initialization, Rails calls "require" on those files which are located in vendor/plugins/ some_plugin/lib? Thanks a lot! xonmac --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Roderick van Domburg
2007-Sep-21 10:57 UTC
Re: Initialization: where does Rails ''require'' its plugins''
xonmac wrote:> Can someone point out, where, during initialization, Rails calls > "require" on those files which are located in vendor/plugins/ > some_plugin/lib?After it yielded the block inside of Rails::Initializer.run in config/environment.rb. The actual code is in railties/lib/initializer.rb on line 182. -- Roderick van Domburg http://www.nedforce.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
xonmac
2007-Sep-21 11:26 UTC
Re: Initialization: where does Rails ''require'' its plugins''
Thanks for your reply.> After it yielded the block inside of Rails::Initializer.run in > config/environment.rb. The actual code is in railties/lib/initializer.rb > on line 182.Do you refer to the load_plugins function? I looked through it, also through ''load_plugin'' which is called in its turn. I see where the plugins paths are added to $LOAD_PATH, I also see where init.rb is evaluated... But where the actual including of lib/ files takes place, stays a mystery for me. Could you elaborate?> > -- > Roderick van Domburghttp://www.nedforce.com > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Roderick van Domburg
2007-Sep-21 11:37 UTC
Re: Initialization: where does Rails ''require'' its plugins''
xonmac wrote:>> After it yielded the block inside of Rails::Initializer.run in >> config/environment.rb. The actual code is in railties/lib/initializer.rb >> on line 182. > > Do you refer to the load_plugins function? I looked through it, also > through ''load_plugin'' which is called in its turn. I see where the > plugins paths are added to $LOAD_PATH, I also see where init.rb is > evaluated... But where the actual including of lib/ files takes place, > stays a mystery for me. Could you elaborate?Line 401 read the init.rb and evals its contents. -- Roderick van Domburg http://www.nedforce.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---