samuel janes samuel janes - 1 year ago 222
CSS Question

Errno::ENOENT in Posts#index

I created a model called Post for my rails projects
the problem is i keep on getting this error:

Errno::ENOENT in Posts#index
Showing C:/Users/Sam's/Desktop/Websites/projects/christina/cp-blog/app/views/layouts/application.html.erb where line #5 raised:

My application.html.erb file looks like this

<!DOCTYPE html>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>

<%= yield %>


Is there any way to fix this (I already install nodejs and restarted windows)

Answer Source

First, stylesheet_link_tag, returns a stylesheet link tag for the sources specified as arguments. It will check application.scss or application.css in your app/assets/stylsheets. Make sure application.css or application.scss exist in that specified path.

Second, if file exist, then reinstall gem using,

bundle install -f 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download