tutorial: gravatar_image_tag problem

Hi all,

Still working through the Hartl tutorials. Making progress but am hitting (another) wall.

The repository is on github at: git@github.com:aamax/sample_app.git if you want to see the code. I’ve pretty much followed the tutorial exactly except I am using rails 3.1.0 rather than 3.0.1 and some of the other gem versions are different…

I posted a gist entry at https://gist.github.com/1257103

Hopefully I posted enough info to get the idea of what’s going on…seems like I must be using the gravatar_image_tag gem wrong or the rspec test is coded wrong but I’ve read through the tut over and over and can’t find any differences…. If I hard code a link in the show page for an image tag it works great, passes the tests and shows the page…

I do have it showing the page and the gravatar fine now, but the test still fails… if I take the class reference in the gravatar_image_tag gem call it works fine… I figure I’m using the class wrong. I AM using a newer version of the gravatar BUT, I originally was using the specific version referenced in the tutorial and the results were the same…

Has anyone got any experience with this gem and what am I doing wrong? J



The spec is looking for an IMG tag within an H1 tag, and it wants that IMG tag to have CLASS=“gravatar”. If you scroll down to your HTML source, there is no CLASS attribute on your gravatar IMG tag. This is dealt with in the tutorial. Go down to the heading named ‘A gravatar helper’ to find out how to fix this: