config.paths['config/environments'] doesn't allow additional directories #6335

Closed
paulwalker opened this Issue May 15, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@paulwalker

The code apparently just considers the first path in the array

initializer :load_environment_config, :before => :load_environment_hook, :group => :all do
  environment = paths["config/environments"].existent.first
  require environment if environment
end

consider changing to:

initializer :load_environment_config, :before => :load_environment_hook, :group => :all do
  paths["config/environments"].existent.each do |environment|
    require environment
  end
end
@tenderlove

This comment has been minimized.

Show comment Hide comment
@tenderlove

tenderlove May 16, 2012

Owner

@drogus can you take a look at this? I'm not sure what this code is for, and it looks like you wrote it! ;-)

Owner

tenderlove commented May 16, 2012

@drogus can you take a look at this? I'm not sure what this code is for, and it looks like you wrote it! ;-)

@drogus

This comment has been minimized.

Show comment Hide comment
@drogus

drogus May 16, 2012

Member

Oops, somehow I missed that ticket, I will take a look at it.

Member

drogus commented May 16, 2012

Oops, somehow I missed that ticket, I will take a look at it.

@drogus drogus closed this in 8bc1e53 May 16, 2012

@drogus

This comment has been minimized.

Show comment Hide comment
@drogus

drogus May 16, 2012

Member

@paulwalker thanks for spotting this! It seems I just moved this code to an engine here 7cccfed and haven't thought that this config/environments should actually be able to contain more than one env.

Member

drogus commented May 16, 2012

@paulwalker thanks for spotting this! It seems I just moved this code to an engine here 7cccfed and haven't thought that this config/environments should actually be able to contain more than one env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment