It would have been better to use Ruby's .each method here. Rather than hard code each line it could be more dynamic. Using the instance variable that is an array of movie hashes:
<% @all_titles_sorted.each do |movie| %>
<br><a href='details/<%= movie["imdbID"] %>'> <%= movie["title"] %> <%= movie["year"] %> </a></br>
<% end %>

Way fewer lines of code in the view and main.  If you have any questions, feel free to ask.