NoMethodError in Main#index

Showing app/views/main/index.html.erb where line #26 raised:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each

Extracted source (around line #26):

23:   <h3><a href="/links">Linkkivinkit</a></h3>
24:   <p>Kaikki kahvista</p>
25:   <ul>
26: 	<% for link in @links %>
27: 		<li><%=link_to h(truncate(link.title, :length => 22, :omission => '...')), "http://" + link.address.gsub('http://', ''), :target => '_blank'%></li>
28: 	<%end%>
29:   </ul>		

RAILS_ROOT: /var/rails/pauligcafe

Application Trace | Framework Trace | Full Trace
/var/rails/pauligcafe/app/views/main/index.html.erb:26:in `_run_erb_app47views47main47index46html46erb'

Request

Parameters:

{"path"=>["lapsilta-kielletty"]}

Show session dump

Response

Headers:

{"Content-Type"=>"text/html",
 "Cache-Control"=>"no-cache"}