Created
August 10, 2010 18:55
Revisions
-
chrisk created this gist
Aug 10, 2010 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ # Git doesn't remove submodules from your working tree when you pull. This Rails # initializer will take care of it for you, so developers don't have to do # anything. paths = %w(vendor/gems/first_gem-1.0.0 vendor/gems/another_gem-1.0.0) paths.each do |path| dir = Rails.root.join(path) if File.directory?(dir) puts "Automatically deleting #{dir.sub(Rails.root.to_s + '/', '')}, since it's an old submodule that we removed" FileUtils.rm_rf dir end end