打印

文字编译错误如何解决?

文字编译错误如何解决?

语句:  <%= link_to("总类列表", :action => "list_class") %>在web浏览是出现如下错误:

Showing app/views/layouts/articleadmin.rhtml where line #23 raised:

compile error
D:/rrspace/web/config/../app/views/layouts/articleadmin.rhtml:23: syntax error, unexpected tIDENTIFIER, expecting ')'
_erbout.concat "                "; _erbout.concat(( link_to('总类列表', :action => 'list_class') ).to_s); _erbout.concat "\n"
                                                                                              ^
D:/rrspace/web/config/../app/views/layouts/articleadmin.rhtml:23: unterminated string meets end of file
D:/rrspace/web/config/../app/views/layouts/articleadmin.rhtml:23: syntax error, unexpected $end, expecting ')'

Extracted source (around line #23):

20:                 <br/>
21:                 <br/>
22:               <div class="ListTitle">
23:                 版面管理
24:               </div>  
25:                 <%= link_to('总类列表', :action => 'list_class') %>
26:                 <%= link_to("增添总类", :action => "add_class")%><br/>  

而将"总类列表"改为"列表总类"后,则可以成功预览...何解?

TOP

怀疑是文件编码问题,设置文件编码为utf8
First they ignore you, then they laugh at you, then they fight you, then you win.

TOP

多谢帮忙......

TOP