Rails没有加载application.css

时间:2014-06-14 18:54:48

标签: html css ruby-on-rails sass haml

我的开发中根本没有加载Css文件,我有点困惑为什么

!!!
%html
  %head
    %title Cohortboard
    = stylesheet_link_tag    'application', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  %body
    = yield
在我的application.css.sass

中,

是我生成的haml

/*
 *= require_self
 */

body {
  background: #f2f2f4;
}

@import "main/variables";
@import "styles/students";

这是我的development.rb文件,以防它干扰

Rails.application.configure do
  config.cache_classes = false
  config.eager_load = false
  config.consider_all_requests_local       = true
  config.action_controller.perform_caching = false
  config.action_mailer.raise_delivery_errors = false
  config.active_support.deprecation = :log
  config.active_record.migration_error = :page_load
  config.assets.debug = true
  config.assets.raise_runtime_errors = true
end

当我加载网页时,没有加载样式

Started GET "/" for 127.0.0.1 at 2014-06-14 13:23:46 -0700
Processing by StudentsController#home as HTML
Rendered students/home.html.haml (5.0ms)
Completed 200 OK in 19ms (Views: 10.8ms | ActiveRecord: 0.0ms)

1 个答案:

答案 0 :(得分:0)

我的控制器不是继承自

  

的ApplicationController