Move require_dependency where they should be
Fix error catching
Use Rails.configuration.to_prepare to load patches
Pust plugin name in variable to be portable