Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 需要了解此错误的帮助-显示页面中的SyntaxError_Ruby On Rails_Templates_Haml - Fatal编程技术网

Ruby on rails 需要了解此错误的帮助-显示页面中的SyntaxError

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

在我的本地环境中工作时出错,但推送到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:           
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