Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created November 30, 2011 05:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenderlove/1408103 to your computer and use it in GitHub Desktop.
Save tenderlove/1408103 to your computer and use it in GitHub Desktop.
gemspecs loaded too many times

Every gemspec seems to be loaded twice

Every gemspec on the system seems to be loaded twice. This includes every version of each gem. So if you have sqlite3 installed twice, each versions gemspec will be loaded twice. Not just gemspecs in your Gemfile. To see it in action, clone this repo, then run:

$ ruby -I. -rfuuu -S bundle sh | sort | uniq -c

Here is a video showing the problem:

http://youtu.be/J9UPdojweDk

Thanks!

class Gem::Specification
class << self
alias :old_load :load
def load file
puts file
old_load file
end
end
end
gem 'tilt'
GEM
specs:
tilt (1.3.3)
PLATFORMS
ruby
DEPENDENCIES
tilt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment