Skip to content

Commit

Permalink
Work around a gem dependency edge case that prevents Rails from booti…
Browse files Browse the repository at this point in the history
…ng..

If you have a frozen gem with unfrozen dependencies (for instance if the
dependency has native extensions so can't be frozen) you can have a
nightmare upgrade problem, where you cannot rake gems:install, because
rake is broken by a gem loading problem.

If you bump up your frozen gem to a newer version that requires a newer
dependency, everybody else on the team will have rake broken by that
dependency mismatch, since you will have had to specify the dependency
in your config.gems, otherwise nobody will have installed it, since the
parent is frozen. And now the config.gems loading code will kill rake.

[#2609 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
knzconnor authored and jeremy committed Jun 6, 2009
1 parent ccf70b9 commit 6a3f8ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/initializer.rb
Expand Up @@ -304,7 +304,7 @@ def add_gem_load_paths
end

def load_gems
unless $gems_build_rake_task
unless $gems_rake_task
@configuration.gems.each { |gem| gem.load }
end
end
Expand Down

0 comments on commit 6a3f8ae

Please sign in to comment.