title: Adding to Rails autoload_path from Gem
body: <p>I want to write a gem that adds a <code>app/services</code> directory to a Rails application.</p>
  
  <p>Since I want to add it from within the Gem i came up with this solution:</p>
  
  <pre><code>class Railtie &lt; ::Rails::Railtie
    config.after_initialize do |app|
      ::Rails.logger.info "adding #{ActiveService::Configuration.path} to autoload_path"
      app.config.autoload_paths = [ActiveService::Configuration.path] + app.config.autoload_paths
    end
  end
  </code></pre>
  
  <p>The problem is that <code>config.autoload_path</code> is a frozen array, so that modifing it seems not to be a good idea. </p>
  
  <p>Any suggestions of how this could be achieved in a better way?</p>