做一个简单的Rails
项目,当我尝试在localhost:3000
上运行它时,出现错误:
ActionView::Template::Error (The asset "courses/python" is not present in the asset pipeline.):
5:<div class="card">
6:<div class="card-image">
7:<%= link_to course do %>
8:<%= image_tag "courses/#{course.image}" %>
9:<% end %>
10:</div>
11:<div class="card-content">app/views/pages/home.html.erb:8app/views/pages/home.html.erb:7app/views/pages/home.html.erb:3
答案 0 :(得分:0)
app/assets/images/courses/course_image.jpg
application.css
之类的//= require courses
文件中<%= image_tag "courses/course_image.jpg" %>
有关资产管道here
的更多信息