chrismytton / fancybox-rails

Use FancyBox with the Rails asset pipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while compiling assets

maxprokopiev opened this issue · comments

Get an error, while trying to complie assets

gem versions:

rails 3.1.3
sass-rails 3.1.5
fancybox-rails 0.1.4

backtrace:

bundle exec rake assets:precompile --trace                                                           
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/max/.rvm/rubies/ruby-1.9.3-p0/bin/ruby /Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Invalid CSS after " */": expected selector or at-rule, was "#fancybox-loadi..."
  (in /Users/max/Documents/Projects/fs/tch/repos/allabout-classifieds/app/assets/stylesheets/application.css)
(sass):26
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/scss/parser.rb:928:in `expected'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/scss/parser.rb:874:in `expected'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/scss/parser.rb:28:in `parse'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/engine.rb:326:in `_to_tree'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/engine.rb:299:in `_render'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-3.1.15/lib/sass/engine.rb:246:in `render'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sass-rails-3.1.1/lib/sass/rails/compressor.rb:7:in `compress'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/compressors.rb:18:in `compress'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/processing.rb:243:in `block in css_compressor='
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/processor.rb:29:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/processor.rb:29:in `evaluate'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/context.rb:175:in `block in evaluate'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `evaluate'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:242:in `block in build_source'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/caching.rb:30:in `cache_hash'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:235:in `build_source'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:71:in `digest'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/asset.rb:95:in `digest_path'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:58:in `path_for'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:35:in `write_asset'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:21:in `block in compile'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:151:in `block in each_logical_path'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:139:in `block (2 levels) in each_file'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each_entry'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:137:in `block in each_file'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each_file'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:149:in `each_logical_path'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:66:in `block (3 levels) in <top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/max/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/max/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `load'
/Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/max/.rvm/rubies/ruby-1.9.3-p0/bin/r...]
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/max/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/max/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `load'
/Users/max/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile

Hmmm, can't seem to reproduce this using your versions of the gems.

Can you confirm that your app/assets/application.css looks something like the following?

/*
 * 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 fancybox
 *= require_tree .
*/

May be app/assets/stylesheets/application.css ?)
Yep, it looks just like that

sass versions:

  • sass (3.1.14)
  • sass-rails (3.1.5)

For some reason sass used to compile jquery.fancybox.css.erb

What's on line 26 of your application.css? The stack trace seems to suggest that the problem may be there.

at compile time this is not mine application.css anymore, because of it was merged with jquery.fancybox.css.erb and line 18 in this file is line 26 in new application.css

Here's the output I get with a fresh rails project matching your versions (from the stack trace).

https://gist.github.com/75064d2e10e892eaf65e

Are you able to load the stylesheet (at http://localhost:3000/assets/application.css) in a browser without getting an error?

Renaming application.css to application.css.scss made my day +)
Thank you for your quick response, anyway!