How to deal with vendor/plugins after upgrading to rails 3.2.1

After upgrading to rails 3.2.1 This warning occurs

You have Rails 2.3-style plugins in vendor/plugins! Support for these
plugins will be removed in Rails 4.0. Move them out and bundle them in
your Gemfile, or fold them in to your app as lib/myplugin/* and config/
initializers/myplugin.rb. See the release notes for more on this:

I move all my plugins in vendor/plugins to lib/myplugin/ directory,
but i don’t know how to write initialize file config/initializers/
So plugins can’t work …