我有一个带有 twitter-boostrap-rails gem 的 Rails 3.2 应用程序。运行 rake assets:precompile 失败:
alex@BlackBeast:~/myapp$ rake assets:precompile
/home/alex/.rvm/rubies/ruby-1.9.3-head/bin/ruby /home/alex/.rvm/gems/ruby-1.9.3-head@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Invalid CSS after "...4882640c.png"")": expected "{", was ";background-pos..."
(in /home/alex/myapp/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): [/home/alex/.rvm/rubies/ruby-1.9.3-head/bin...]
有什么办法可以调试这个问题吗?不知道该怎么做。
更新:将 twitter-bootstrap-rails gem 更新到 2.1.6 版本后,预编译现在失败并出现不同的错误:
rake aborted!
Invalid CSS after "}": expected "{", was ""
(in /home/alex/myapp/app/assets/stylesheets/application.css)
(sass):1673
错误中提到的 application.css 是标准的,带有
*= require_self
*= require_tree .
..这使得确定哪个部分导致问题有点困难。
我可以以某种方式只编译 bootstrap_and_overrides.less 并查看哪里出了问题吗?