Eric Bréchemier and mtyaka are both correct.
Another approach (if you need to add custom elements to the header/footer that are specified on a per view basis, you'll want to do something like this with yield blocks
Here's an example allowing the title to be overriden on a per page basis, but the same technqiue applies to setting up script
tags in the HTML head tag.
app/views/layouts/posts_layout.html.erb
<html>
<head>
<title><%= yield(:page_title) || "My awesome site"%></title>
</head>
<body><%= yield %> </body>
</html>
app/views/posts/index.html.erb
<%= content_for :page_title, "post listing" %>
<h1>Here are your posts...</h1>