Heroku Rails 4 Assets do not load

Asked

Viewed 45 times

0

After I have deployed these files below are not being loaded.

erro console chrome

This is my directory

diretórios

This is my application.Rb

application.rb

Here as they are being called

<%= stylesheet_link_tag "home" %>
<%= javascript_include_tag "home" %>

<img class="client" src="<%= asset_path('b.png') %>">

update:

I noticed are not only those listed Assets, no Asset is carrying.

1 answer

0

Solved

Errors were inside the files scss.erb. They didn’t properly call the Rails helpers image_tag and asset_path.

My scss.erb files was as below.

Wrong

background: url(<%= image_path 'fake_slider.png' %>) no-repeat 0 0;

Right way
I put them in double quotes " " and then it all worked out

background: url("<%= image_path 'fake_slider.png' %>") no-repeat 0 0;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.