Skip to content

Commit

Permalink
don't clear cache on new apps
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Oct 12, 2012
1 parent 075ae90 commit fe8e186
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/language_pack/ruby.rb
Expand Up @@ -578,10 +578,9 @@ def load_bundler_cache
full_ruby_version = run(%q(ruby -v)).chomp
ruby_version_cache = "vendor/ruby_version"
cache_load ruby_version_cache
bundle_cache_loaded = cache_load "vendor/bundle"

if File.exists?(ruby_version_cache) && full_ruby_version == File.read(ruby_version_cache).chomp
cache_load "vendor/bundle"
else
if bundle_cache_loaded && !(File.exists?(ruby_version_cache) && full_ruby_version == File.read(ruby_version_cache).chomp)
puts "Ruby version change detected. Clearing bundler cache."
cache_clear "vendor/bundle"
end
Expand Down

0 comments on commit fe8e186

Please sign in to comment.