Cannot precompile all css in rails application though rake assets:precompile

I have a rails application and try to deploy it to my local apache server now right.

I tried to precompile the css,javascript file though the command rake assets:precompile and no errors came out.

However, I cannot not access the website though localhost properly and I checked the log file of production.

Error :

ActionView::Template::Error (scaffolds.css isn't precompiled): 3: 4: Pragprog Books Online Store 5: 6: <%= stylesheet_link_tag "scaffolds" %> 7: <%= stylesheet_link_tag "depot", :media => "all" %> --> 8: <%= stylesheet_link_tag "pagination" %> 9: app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__1763484413904368549_70243433398420'

It seems that the scaffolds.css cannot be precompiled with the command.

I have changed the config to config.assets.compile = true and my website works. :) But I want to know why the command cannot precompile that css.


Check out these lines in your production.rb (or whatever environment you are using), which are probably still commented out:

# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )

Simply use this option to specify additional assets to precompile, for example:

config.assets.precompile += %w( *.js *.scss *.coffee *.css )

Need Your Help

Organizing templates in sub-directories in Play

playframework playframework-2.0

Can I organize my view templates in subdirectories in play 2.1?

FileChannel zero-copy transferTo fails to copy bytes to SocketChannel

java sockets nio zero-copy

I'm seeing some strange behavior when transferring large files from file to socket using zero-copy in Java. My environments:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.