應用程序/資產/樣式表/ application.css如何配置Rails的資產管道使用Formtastic的CSS
*= require formtastic
我得到這個錯誤:
rake assets:precompile
/Users/Nerian/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby /Users/Nerian/.rvm/gems/[email protected]/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Invalid CSS after "*": expected "{", was "= require formt..."
(in /Users/Nerian/Projects/davinci/app/assets/stylesheets/application.css)
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/Users/Nerian/.rvm/rubies/ruby-1.9.3-rc1/b...]
所以rake任務不工作,但奇怪的是,當我在開發中運行應用程序時,由於我可以看到正在應用的formtastic css,所以資源被編譯。
我在做什麼錯?
編輯:
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require_tree .
*= require formtastic
*= require my_formtastic_changes
*/
這是有一個註釋組之外。我把它們放在裏面,現在它工作:) – Nerian