I follow the guide railstutorial.org. Although I can see gravatar on the webpage, my rspec test does not work.
Here is the user_controller_spec.rb test:
describe "GET 'show'" do
before(:each) do
@user = Factory(:user)
end
it "should be successful" do
get :show, :id => @user
response.should be_success
end
end
Here is the corresponding show.html.erb file:
<table class="profile" summary="Profile information">
<tr>
<td class="main">
<h1>
<%= gravatar_image_tag(@user.email) %>
<%= @user.name %>
</h1>
</td>
<td class="sidebar round">
<strong>Name</strong> <%= @user.name %><br />
<strong>URL</strong> <%= link_to user_path(@user), @user %>
</td>
</tr>
</table>
I get the error "undefined method" gravatar_image_tag ". I already installed the corresponding stone by doing" gem install gravatar_image_tag ", adding it to my gemfile, and also doing" bundle install ". It is listed as installed when I run the" gem list "
I am trying to debug this for several hours. Any help would be greatly appreciated. Thanks in advance. BTW, I am running 32-bit Windows 7 with GIT Bash, RubyInstaller-1.9.2-p0.
Error message:
