In this case, this code should be entered as a preliminary initializer. Starting with Rails 3, all pre-initialization code should be near the top of application.rb, before the line require 'rails/all'
application.rb:
require File.expand_path('../boot', __FILE__)
source share