Anh Bui
Anh Bui

Reputation: 1

ActionView::Template::Error (The asset "courses/python" is not present in the asset pipeline?

I am making a very simple Rails program, and I am facing a problem:

Error shows that problem is at line 3

<div class="card-image">
<%= link_to course do %>
<%= image_tag "courses/#{course.image}" %>
<% end %></div><div class="card-content">

The asset "courses/python" is not present in the asset pipeline.

I thought that my code was ok? Could you please give me some idea?

Upvotes: 0

Views: 84

Answers (1)

Clara
Clara

Reputation: 2715

Probably you're missing the file extension.

Also make sure that an image is provided inside: assets/images/courses with the exact same name as course.image

Upvotes: 1

Related Questions