Closed jackmcpickle closed 10 years ago
Same happens to me (using csscss 1.3.2
on ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin13.0.0]
):
vendor-bundler/ruby/1.9.1/gems/csscss-1.3.2/lib/csscss/types.rb:11:in `from_parser': undefined method `downcase' for 3817:Fixnum (NoMethodError)
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/csscss-1.3.2/lib/csscss/parser/css.rb:118:in `block in <class:Transformer>'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:195:in `instance_eval'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:195:in `call_on_match'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:213:in `block in transform_elt'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:210:in `each'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:210:in `transform_elt'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:171:in `apply'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `block in recurse_array'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `map'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `recurse_array'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:168:in `apply'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:225:in `block in recurse_hash'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `each'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `inject'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `recurse_hash'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:166:in `apply'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:225:in `block in recurse_hash'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `each'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `inject'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `recurse_hash'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:166:in `apply'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `block in recurse_array'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `map'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `recurse_array'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:168:in `apply'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:225:in `block in recurse_hash'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `each'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `inject'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `recurse_hash'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/parslet-1.6.1/lib/parslet/transform.rb:166:in `apply'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/csscss-1.3.2/lib/csscss/parser/css.rb:8:in `parse'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/csscss-1.3.2/lib/csscss/redundancy_analyzer.rb:14:in `redundancies'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/csscss-1.3.2/lib/csscss/cli.rb:40:in `execute'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/csscss-1.3.2/lib/csscss/cli.rb:17:in `run'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/csscss-1.3.2/lib/csscss/cli.rb:200:in `run'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/gems/csscss-1.3.2/bin/csscss:4:in `<top (required)>'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/bin/csscss:23:in `load'
from /Volumes/Macintosh_HD/vrose/Sites/bst_wlpd_frontend/vendor-bundler/ruby/1.9.1/bin/csscss:23:in `<main>'
Can either of you paste me the smallest snippet that causes this failure?
Tried the most basic css file i could find. File viewable here: http://www.kangarooislandbc.com/css/kibc-style.css
output below.
$ csscss Sites/kibookingcentre/public/css/kibc-style.css
/Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/csscss-1.3.2/lib/csscss/types.rb:11:in `from_parser': undefined method `downcase' for 15:Fixnum (NoMethodError)
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/csscss-1.3.2/lib/csscss/parser/css.rb:118:in `block in <class:Transformer>'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:195:in `instance_eval'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:195:in `call_on_match'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:213:in `block in transform_elt'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:210:in `each'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:210:in `transform_elt'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:163:in `apply'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `block in recurse_array'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `map'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `recurse_array'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:168:in `apply'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:225:in `block in recurse_hash'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `each'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `inject'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `recurse_hash'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:166:in `apply'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:225:in `block in recurse_hash'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `each'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `inject'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `recurse_hash'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:166:in `apply'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `block in recurse_array'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `map'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:232:in `recurse_array'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:168:in `apply'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:225:in `block in recurse_hash'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `each'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `inject'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:224:in `recurse_hash'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/parslet-1.6.1/lib/parslet/transform.rb:166:in `apply'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/csscss-1.3.2/lib/csscss/parser/css.rb:8:in `parse'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/csscss-1.3.2/lib/csscss/redundancy_analyzer.rb:14:in `redundancies'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/csscss-1.3.2/lib/csscss/cli.rb:40:in `execute'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/csscss-1.3.2/lib/csscss/cli.rb:17:in `run'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/csscss-1.3.2/lib/csscss/cli.rb:200:in `run'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/gems/csscss-1.3.2/bin/csscss:4:in `<top (required)>'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/bin/csscss:23:in `load'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/bin/csscss:23:in `<main>'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
from /Users/jack.mcnicol/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Same output for ruby 1.9
Interesting. That fails for 1.9 and not 2.1. I'm pasting the css here in case that link goes away.
body{
margin:0;
padding:0;
}
h3 {
font-size: 16px;
font-family: Arial, Helvetica, sans-serif;
color: #009933;
font-weight: bold;
}
.container {
margin: 0 auto;
width: 997px;
}
.text-center {
text-align: center;
}
.right {
float: right;
}
.left {
float: left;
}
.main {
background-color: white;
border-radius: 10px;
margin-left: 210px;
padding: 5px 20px 10px;
}
.side {
width: 190px
margin-right: 20px;
}
.clearfix {
clear: both;
}
Having the same issue here, Ruby 2.1.1
Exactly the same issue parsing some fairly bog standard Foundation 4 SCSS. Running Ruby 2.0.0.
Interesting, the snippet above passes for me in v2.1.1 but fails with that error on v2.1.2. I'll try and carve out some time this weekend to release a fix.
Fixed in e838aafa8aceb608bc48865363f7f94b49be4da8 and released with v1.3.3.
Not sure why I'm getting this.
Same issue with ruby-1.9.3-p547 and ruby-2.1.2