How do I change the load order of initializers in Rails?

Rename the initializer to 01_name.rb, that will force it to load alphabetically previously.

Edit

To quote the official Rails Guide for configuration (thanks zetetic for the tip):

If you have any ordering dependency in
your initializers, you can control the
load order by naming. For example,
01_critical.rb will be loaded before
02_normal.rb.

Leave a Comment