Kernel.require(autorequire || name) 🔮 I didn't set anything to "autorequire" attribute, so it just requires the "name" 🔮 equivalent to `require 'hello'` 🔮 hello/lib/ is included in $LOAD_PATH, so finally ruby finds hello/lib/hello.rb and loads it

The points so far 🔮 You can bundle a directory as a gem if it has a .gemspec file 🔮 bundler automatically calls "gem/lib/#{gemname}.rb" 🔮 You can create a Rails hook by inheriting ::Rails::Railtie class inside the plugin

Rails Engine 🔮 A Rails plugin is a gem 🔮 A Rails plugin is a Railtie 🔮 A Rails Engine is also a Railtie

If a class.is_a? Engine, it should be a Railtie as well % rails r "p Rails::Engine.ancestors" [Rails::Engine,Rails::Railtie,Rails::Initializable,Object,ActiveSupport::Dependencies::Loadable,JSON::Ext::Generator::GeneratorMethods::Object,Kernel, BasicObject]

What can a Mountable Engine do? 🔮 It can provide safely namespaced models, controllers, views, etc. 🔮 It can be "mounted" onto the parent Rails application's certain URL 🔮 It can refer to the parent application from controllers / views via `main_app` method

HocusPocus (reprise) 🔮 A Wiki-wiki way Rails app development platform 🔮 Users can edit current page like a Wiki page 🔮 Catches URL missing in the browser for example, just visithttp://localhost:3000/books 🔮 Catches link_to missing in the browser for example, add`link_to 'authors', authors_path`