Ruby on rails 需要了解此错误的帮助-显示页面中的SyntaxError
在我的本地环境中工作时出错,但推送到Heroku的完全相同的代码工作得很好。有什么想法吗 下面是当我尝试转到应用程序本地环境中的任何页面时显示的内容Ruby on rails 需要了解此错误的帮助-显示页面中的SyntaxError,ruby-on-rails,templates,haml,Ruby On Rails,Templates,Haml,在我的本地环境中工作时出错,但推送到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: sy
/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:
210:“当前”%>
211:
212:“当前”
214:结束%>
问题在于:
<%= link_to_unless_current item.name.capitalize, polymorphic_path(item.navigable), do
请参见下面的链接,了解如何使用链接到
你的问题在逗号(“,”)前做什么
<%= link_to_unless_current item.name.capitalize, polymorphic_path(item.navigable), do
<%= link_to_unless_current item.name.capitalize, polymorphic_path(item.navigable), do
<%= link_to_unless_current item.name.capitalize, polymorphic_path(item.navigable) do