0

This is my css file, but only admin_layout.css.scss and admin_style.css.scss not found.

I could not upload photo, so I wrote a blog.

my blog: Rails a few css not found 404

GEOCHET
  • 21,119
  • 15
  • 74
  • 98

1 Answers1

3

In your config/application.rb you need to add the following

config.assets.precompile += %w[ admin_layout.css admin_style.css ]

You can learn more about this in the Asset Pipeline Rails Guide. Specifically

The default matcher for compiling files includes application.js, application.css and all non-JS/CSS files (i.e., .coffee and .scss files are not automatically included as they compile to JS/CSS):

  [ Proc.new{ |path| !File.extname(path).in?(['.js', '.css']) }, /application.(css|js)$/ ]

If you have other manifests or individual stylesheets and JavaScript files to include, you can add them to the precompile array:

  config.assets.precompile += ['admin.js', 'admin.css', 'swfObject.js']
deefour
  • 34,974
  • 7
  • 97
  • 90
  • Please, accept the Answer if it's solved your problem (the green check under the votes next to my Answer) – deefour Jun 05 '13 at 03:33