레일즈를 배우고 있으며 답변을 찾을 수없는 프로 렘이 있습니다. 나는 두 개의 CSS 파일 "print.css"와 "screen.css"를 "/ public/stylesheets"에 가지고있다.레일스 스타일 시트가로드되지 않습니다.
레이아웃에서 "application.html.erb"파일을로드하고 서버를 시작하면 파일이 로컬 웹 사이트에서 누락되었습니다. 여기
GET http://localhost:3000/assets/print.css 404 (Not Found)
GET http://localhost:3000/assets/screen.css 404 (Not Found)
는 "application.html.erb"의 코드입니다 :
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
<%= csrf_meta_tag %>
<%= stylesheet_link_tag "screen", "print" %>
</head>
<body>
<%= yield %>
</body>
</html>
또한 내가 내 "./config이
config.assets.compile = true
을 추가 한이 오류입니다 /environment/development.rb "및 도망
bundle exec rake assets:precompile RAILS_ENV=development
아무 소용이 없습니다.
알려 주시기 바랍니다.