Rails::Plugin is nothing more than a Rails::Engine, but since it’s loaded too late in the boot process, it does not have the same configuration powers as a bare Rails::Engine.

Opposite to Rails::Railtie and Rails::Engine, you are not supposed to inherit from Rails::Plugin. Rails::Plugin is automatically configured to be an engine by simply placing inside vendor/plugins. Since this is done automatically, you actually cannot declare a Rails::Engine inside your Plugin, otherwise it would cause the same files to be loaded twice. This means that if you want to ship an Engine as gem it cannot be used as plugin and vice-versa.

Besides this conceptual difference, the only difference between Rails::Engine and Rails::Plugin is that plugins automatically load the file “init.rb“ at the plugin root during the boot process.

Methods
A
C
G
I
N
R
Attributes
[R] name
[R] path
Class Public methods
all(list, paths)
    # File railties/lib/rails/plugin.rb, line 29
29:     def self.all(list, paths)
30:       plugins = []
31:       paths.each do |path|
32:         Dir["#{path}/*"].each do |plugin_path|
33:           plugin = new(plugin_path)
34:           next unless list.include?(plugin.name) || list.include?(:all)
35:           if global_plugins.include?(plugin.name)
36:             warn "WARNING: plugin #{plugin.name} from #{path} was not loaded. Plugin with the same name has been already loaded."
37:             next
38:           end
39:           global_plugins << plugin.name
40:           plugins << plugin
41:         end
42:       end
43: 
44:       plugins.sort_by do |p|
45:         [list.index(p.name) || list.index(:all), p.name.to_s]
46:       end
47:     end
global_plugins()
    # File railties/lib/rails/plugin.rb, line 21
21:     def self.global_plugins
22:       @global_plugins ||= []
23:     end
inherited(base)
    # File railties/lib/rails/plugin.rb, line 25
25:     def self.inherited(base)
26:       raise "You cannot inherit from Rails::Plugin"
27:     end
new(root)
    # File railties/lib/rails/plugin.rb, line 55
55:     def initialize(root)
56:       ActiveSupport::Deprecation.warn "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: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released"
57:       @name = File.basename(root).to_sym
58:       config.root = root
59:     end
Instance Public methods
config()
    # File railties/lib/rails/plugin.rb, line 61
61:     def config
62:       @config ||= Engine::Configuration.new
63:     end
railtie_name()
    # File railties/lib/rails/plugin.rb, line 51
51:     def railtie_name
52:       name.to_s
53:     end