在我的本地环境中工作时出错,但推送到 Heroku 的完全相同的代码工作得很好。有任何想法吗?
这是我尝试转到应用程序本地环境中的任何页面时显示的内容。
/Users/user/badger/app/views/shared/_navigation.html.haml:211: syntax error, unexpected keyword_do_block
/Users/user/badger/app/views/shared/_navigation.html.haml:213: syntax error, unexpected keyword_end, expecting ')'
end ).to_s); _erbout.concat "\n"
^
/Users/user/badger/app/views/shared/_navigation.html.haml:249: syntax error, unexpected keyword_do_block
/Users/user/badger/app/views/shared/_navigation.html.haml:251: syntax error, unexpected keyword_end, expecting ')'
end ).to_s); _erbout.concat "\n"
^
提取的源代码(在 #211 行附近):
208: :erb
209: <% if @page and @page.categories_include("About") %>
210: <%= link_to item.name.capitalize, polymorphic_path(item.navigable), :class => "current" %>
211: <% else %>
212: <%= link_to_unless_current item.name.capitalize, polymorphic_path(item.navigable), do
213: link_to item.name.capitalize, polymorphic_path(item.navigable), :class => "current"
214: end %>