嘿伙计们,我正在通过 schneems https://github.com/Stephenitis/ruby_view_server上这节课(请参阅自述文件)
我进入第 6 步)与您的服务器交谈,我的意思是添加 <%= @request.query.inspect %>
当我运行 $ ruby page_generator_with_layout.rb
我收到这个错误
- Converting .html.erb to html with Layout !!!
(erb):14:in `process_erb': undefined method `query' for nil:NilClass (NoMethodError)
from /Users/Jupitor/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/erb.rb:838:in `eval'
from /Users/Jupitor/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/erb.rb:838:in `result'
from page_generator_with_layout.rb:6:in `process_erb'
from page_generator_with_layout.rb:24:in `block in <main>'
from page_generator_with_layout.rb:13:in `each'
from page_generator_with_layout.rb:13:in `<main>'