Rails: Gravatar images not showing up in Chrome

google-chrome, gravatar, ruby-on-rails

Solution

For me, I had to add (http://localhost:3000/) to Ghostery's whitelisted sites to solve the same issue.

Problem

I'm working through the Michael Hartl's Ruby on Rails Tutorial, and I've added code to display a user's Gravatar image. It works fine in Firefox and Safari, but not in Chrome (the image just doesn't show up). The view: ``` #app/views/users/show.html.erb <% provide(:title, @user.name) %> <h1> <%= gravatar_for @user %> <%= @user.name %> </h1> ``` and helper: ``` #app/helpers/users_helper.rb module UsersHelper # Returns the Gravatar (http://gravatar.com/) for the given user. def gravatar_for(user) gravatar_id = Digest::MD5::hexdigest(user.email.downcase) gravatar_url = "https://secure.gravatar.com/avatar/#{gravatar_id}" image_tag(gravatar_url, alt: user.name, class: "gravatar") end end ``` What's wrong here?

Original source