运行Sass::SyntaxError:
rake assets:precompile RAILS_ENV=production --trace
在development mode
下找不到任何内容(不运行预编译)
我在application.rb
config.assets.paths << "#{Rails.root}/vendor/themes"
themes
├── ace-admin-theme
│ ├── avatars
│ ├── css
│ ├── font
│ ├── images
│ ├── img
│ └── js
└── lenord-single-page-theme
├── css
├── fonts
├── img
├── index.html
├── js
└── rs-assets
rake assets:precompile RAILS_ENV=production --trace
我收到了错误消息
rake aborted!
Sass::SyntaxError: Invalid CSS after "...{width:100% \0/": expected expression (e.g. 1px, bold), was ";height:30px \0..."
(in /Users/hsu-wei-cheng/Dropbox/Rails/dqa_dev_server/vendor/themes/ace-admin-theme/css/application.css)
(sass):18
/Users/hsu-wei-cheng/.rvm/gems/ruby-2.1.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1147:in `expected'
/Users/hsu-wei-cheng/.rvm/gems/ruby-2.1.0/gems/sass-3.2.19/lib/sass/script/lexer.rb:206:in `expected!'
/Users/hsu-wei-cheng/.rvm/gems/ruby-2.1.0/gems/sass-3.2.19/lib/sass/script/parser.rb:478:in `assert_expr'
/Users/hsu-wei-cheng/.rvm/gems/ruby-2.1.0/gems/sass-3.2.19/lib/sass/script/parser.rb:217:in `times_div_or_mod'
/Users/hsu-wei-cheng/.rvm/gems/ruby-2.1.0/gems/sass-3.2.19/lib/sass/script/parser.rb:209:in `plus_or_minus'
/Users/hsu-wei-cheng/.rvm/gems/ruby-2.1.0/gems/sass-3.2.19/lib/sass/script/parser.rb:209:in `relational'
在application.css
中/*
*= require_tree .
*/
我使用ack-grep
并在{width:100%
colorbox.css
https://gist.github.com/poc7667/0524dccf620842365f6c
在14
9-#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
10-#cboxTitle{margin:0;}
11-#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
12-#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
13-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
14:.cboxIframe{width:100%; height:100%; display:block; border:0;}
15-#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
16-
17-/*
18- User Style:
19- Change the following styles to modify the appearance of Colorbox. They are
答案 0 :(得分:0)
有趣 - 看起来你有语法错误,而不是目录/路径错误:
Sass::SyntaxError: Invalid CSS after "...{width:100% \0/"
我怀疑,原因是你可能会使用某些亚洲字母表,造成字符问题,虽然只是猜测?
<强>修正强>
在此文件中:vendor/themes/ace-admin-theme/css/application.css
你能找到你定义的地方{width: 100% ...
&amp;贴在你的Q?它看起来像一个语法错误,我们可以通过更改它来解决
-
<强>更新强>
参考你的新Github要点,你的CSS语法看起来很好 - 我想这个问题是由非ASCII字符引起的。你能尝试一下:
.cboxIframe {width: 100%; height:100%; display:block; border:0;}