2012-01-04 11 views
-3

私は問題があります。にSyntaxError

/home/rene/ruby_dev/ch05/txt2fields/app/views/look/input.html:9: syntax error, unexpected '=', expecting tASSOC 
...tag :action => 'at', :method = > post);@output_buffer.safe_... 
...        ^

/home/rene/ruby_dev/ch05/txt2fields/app/views/look/input.html:12: syntax error, unexpected tSTRING_BEG, expecting ')'..._field_tag "text2", nil, :size" => 30);@output_buffer.safe_c... 
...        ^

/home/rene/ruby_dev/ch05/txt2fields/app/views/look/input.html:15: syntax error, unexpected tIDENTIFIER, expecting ')' <input type="submit"/> 
         ^

/home/rene/ruby_dev/ch05/txt2fields/app/views/look/input.html:15: unterminated string meets end of file 

/home/rene/ruby_dev/ch05/txt2fields/app/views/look/input.html:15: syntax error, unexpected $end, expecting ')' 

抽出されたソース(ライン#9の周り):あなたのコードで

6:  <h1>Les champs de saisie (champs de texte) version 2</h1> 
7:  Cette application Ruby on Rails lit du texte saisi. 
8:  <br> 
9:  <%= form_tag :action => 'at', :method = > post%> 
10:  Veuillez saisir votre nom. 
11:  <br> 
12:  <%= text_field_tag "text2", nil, :size" => 30%> 

答えて

2

、ライン9

:method = > post%>

:method => post%>

不要なスペースが1つあります。


そしてライン12

:size" => 30

:size => 30

シンボルはクォーテーションで終わらないでなければなりません。