我是
Ruby的新手,使用ruby 1.9.2P180和Rails 3.1.0.rc2
我在my_app_root / public / stylesheets / screen.css和我的application.html.erb中有“screen.css”
<%= stylesheet_link_tag 'screen.css',:media => 'screen' %>
根据here它应该工作,但我的rails服务器说:
Processing by PagesController#home as HTML
Rendered pages/home.html.erb within layouts/application (0.0ms)
Completed 200 OK in 4ms (Views: 3.6ms | ActiveRecord: 0.0ms)Started GET “/assets/screen.css” for 127.0.0.1 at 2011-06-18 11:27:53 +1200
Served asset /screen.css – 404 Not Found (2ms) (pid 10966)ActionController::RoutingError (No route matches [GET] “/assets/screen.css”):
我在这里做错了什么?
提前致谢
解决方法
原文地址:https://www.jb51.cc/ruby/271474.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。