2012-01-04 4 views
-3

나는 문제가있다 :구문 에러

/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%>

하나의 불필요한 공간이 있습니다.


그리고

:size" => 30

라인 (12)은

:size => 30

기호가 인용으로 끝나지 않습니다해야합니다.