I’m trying to extract some functionality from my existing app into a gem. The existing functionality uses an initializer to load up a config file when Rails starts up…
config/initalizers/myinitializer.rb
Where should this initializer go in the gem? Do I mirror the path structure inside the gem or put it somewhere else? This will be my first gem.
When the Gem is loaded, Rails first looks for a file called
init.rbin the main Gem folder and requires it if available.This can be a super-simple base skeleton for a Rails plugin packages as Gem: