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

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?