Looks like there's a bit of a problem rendering template's in Merb 1.0.8.x. In a controller's action (search/index), if I say:
def index @posts = search_posts render :template => "posts/index" end I get: Read error: #<NoMethodError: undefined method `each' for nil:NilClass> /Users/jc/Merb/stalkr/gems/gems/merb-core-1.0.8.1/lib/merb-core/rack/ stream_wrapper.rb:18:in `each' /Users/jc/Merb/stalkr/gems/gems/merb-core-1.0.8.1/lib/merb-core/rack/ handler/mongrel.rb:92:in `process' ---- I spent quite a bit of time tracing it, and here are some interesting notes. If I just turn a string "TEST" from my action, it renders just fine If set render to a variable, and then return that string, it actually works which seems crazy to me def index @posts = search_posts tmp = render(:template => "posts/index") return tmp end Has anyone seen this error before? I starting investigating rack/ stream_wrapper and am not sure exactly what it's doing so its a bit tough to debug. The reason its breaking though is @body is nil so the StreamWrapper got initialized wrong. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
