Jennifer Tanner
Jennifer Tanner

Reputation: 21

Michael Hartl Lesson 3: Rspec Static pages error

Error: http://i.imgur.com/mZ87w.png

Code pasted at http://pastebin.com/mYSMupYy

I've been trying to fix this for awhile and can't see anything wrong.

Upvotes: 0

Views: 180

Answers (2)

toolz
toolz

Reputation: 73

It looks like you are manually setting the titles in all of your .html.erb files instead of using the instance variables you have defined in your controller. Try doing this for each page.

home.html.erb

<!doctype html>
<html lang="en">
<head>
    <title>Ruby on Rails Tutorial Sample App | <%= @title %></title> <!-- changed 'Home' to @title -->
</head>
<body>
    <h1>Home</h1>
<p>This is the home page for the <a href="http://railstutorial.org/">Ruby on Rails     Tutorial</a> sample application.</p>
</body>
</html>

Upvotes: 1

Jason Swett
Jason Swett

Reputation: 45094

I'm guessing your pages don't have the right titles. If you go to the home page, and view the source, does it say "Ruby on Rails Tutorial Sample App | Home" between the <title> tags?

If not, you'll probably want to check app/views/layouts/application.html.erb and edit the title there. There might be a part in the tutorial about that that you missed.

Upvotes: 0

Related Questions