undefined method `gsub' for nil:NilClass

Hi, I'm getting a No Method Error on my listings/index/html.erb page. I'm stuck on how to solve this. Any thoughts? <div class="col-md-3"> <div class="thumbnail"> <%= image_tag listing.image.url %> error is on this line <div class="caption"> <h3><%= listing.name %></h3> <p><%= number_to_currency(listing.price) %></p>

Posted over 2 years ago by Mike
Posted over 2 years ago by Mike

<%= image_tag listing.image.url %> is the line that is throwing the error

1
Posted over 2 years ago by Alex Yang

Mike, it sounds like you're working on the Etsydemo project, but I'm not sure how far along you are. This context will help me troubleshoot your issue. Can you repost this in the Discussion section beneath the video you're currently on? In addition to the error you're seeing in your browser, it would also help to paste your Rails logs output as well.

1