I'm learning Rails by following a tutorial, and I ran into this problem where I want to link to an image with the assistance of assets pipeline like follows
<%= link_to image_tag("rails.png", alt: "Rails logo"), 'http://somewebsite.com' %>
But, when loading the page it shows the following error ,
note that I've deployed my app into Heroku, and it is working just fine !!
Also, I should add that I have experienced the same error before for a different problem and the fix (according to an answer here) was to change the application.html.erb from
<%= stylesheet_link_tag 'application', media: 'all',
'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
to
<%= stylesheet_link_tag 'default', media: 'all',
'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'default', 'data-turbolinks-track': 'reload' %>
and again both codes are working just fine with Heroku.
FYI, my machine is running Windows 10..
You need to downgrade your coffee-script
gem because coffee-script source >= 1.10.0
does not work well with Windows (coffee-script-source Windows issue)
gem 'coffee-script-source', '1.8.0'
to your gemfilebundle update coffee-script-source
This worked for me when I was learning back on my Windows PC.