Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚部署了我的 rails 应用程序,但 css 样式表不会出现
我按如下方式调用样式表:
<%= stylesheet_link_tag 'layout' %>
显而易见的是样式表存在于您的目录中:
public/stylesheets/layout.css
此外,如果您搭建了模型/视图等,请确保您没有另一个带有控制器名称的布局文件:
app/views/layouts/xxxscaffoldname.html.erb
如果您只想显示 application.html.erb(或您所称的任何名称)布局,则会导致您的 css 布局渲染搞砸。