我目前正在第一次使用 ruby 进行开发。你能明白为什么我不断收到以下错误:
/home/apple/Desktop/homework/app/views/specialization/index.html.erb:36: syntax error, unexpected keyword_ensure, expecting keyword_end
/home/apple/Desktop/homework/app/views/specialization/index.html.erb:38: syntax error, unexpected $end, expecting keyword_end
Extracted source (around line #36):
31: </tabel>
32: </body>
我尝试使用 ruby 访问数据库并阅读一些简单的专业化元组。这是我的页面代码:
<html>
<head>
</head>
<body>
<table border=1>
<tr>
<td>Specialization</td>
<td>Number of applicants</td>
<td>Applicants</td>
</tr>
<% Specialization.all.each do |s| %>
<tr>
<td> <%= s.title %> </td>
<td>
<table>
<td>applicant1</td>
<td>applicant2</td>
</table>
</td>
<td><button type="button">Click Me!</button> </td>
</tr>
</tr>
<% end >
</tabel>
</body>
非常感谢你!