tdreyno/middleman — pull request #138 by arronmabrey (2011-10-18 21:48:47+00:00)
Title: Fixing: a Gem scoping bug.

I just wrote a rack middleware gem I'm using in middleman, and when I add it to my projects gem file. (note: I don't even require it or use it in the config file)

And I'm not sure why but I get this error

```
/Users/arron/code/middleman/lib/middleman.rb:166:in `rubygems_latest_specs': uninitialized constant Middleman::Gem::Specification (NameError)
from /Users/arron/code/middleman/lib/middleman.rb:154:in `load_extensions_in_path'
from /Users/arron/code/middleman/lib/middleman.rb:202:in `'
from /Users/arron/code/middleman/bin/middleman:51:in `require'
from /Users/arron/code/middleman/bin/middleman:51:in `start_cli!'
from /Users/arron/code/middleman/bin/middleman:72:in `'
from /Users/arron/.rvm/gems/ruby-1.9.2-p180@encountercreative.com/bin/middleman:19:in `load'
from /Users/arron/.rvm/gems/ruby-1.9.2-p180@encountercreative.com/bin/middleman:19:in `

'
```

In this fix I just had to prefix `Gem::Specification` with `::` not sure why this fixes it. I guess it some kind of scoping problem.

I ran all the tests and they pass, so I guess it's ok.