middleman/middleman — Issue #257: Upgrade to 3.0.0beta1 issue (TypeError nil to String in middleman-core)
Author: MrDys
Created: 2012-02-01 20:19:59+00:00
State: open

In my MM 2.0 app, I had it set up to serve up a directory of YAML files as JSON like so:

config.rb:
```ruby
data.to_h.each_key do |dataset|
page "/api/#{dataset}.json", :layout => false, :proxy => "/api/json.erb", :ignore => true do
@data_set = dataset
end
end
```
json.erb:
```ruby
<%= data.to_h[@data_set].to_json %>
```

Booting it up in 3.0.0beta1 gives:

TypeError at /api/people.json
can't convert nil into String
Ruby	~/.rvm/gems/ruby-1.9.2-p290/gems/middleman-core-3.0.0.beta.1/lib/middleman-core/base.rb: in extname, line 461