Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with 3.3.0.rc.2: NoMethodError: undefined method `tabs' ... #1082

Closed
Fernker opened this issue Jan 10, 2014 · 6 comments
Closed

Error with 3.3.0.rc.2: NoMethodError: undefined method `tabs' ... #1082

Fernker opened this issue Jan 10, 2014 · 6 comments
Labels
bug Something isn't working

Comments

@Fernker
Copy link

Fernker commented Jan 10, 2014

I recently switched to RC2 and in one of my files I'm getting the following error. Even though this file was working before (with a previous pre version). I have had a question up on StackOverflow without any bites.

NoMethodError: undefined method `tabs' for Sass::Tree::CommentNode:Sass::Tree::CommentNode

Using --trace I get the following:

/Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:252:in `block in visit_atroot': undefined method `tabs' for Sass::Tree::CommentNode:Sass::Tree::CommentNode (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:252:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:252:in `visit_atroot'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:21:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `block in visit_children_without_parent'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `map'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `visit_children_without_parent'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:30:in `block in visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:61:in `with_parent'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:29:in `visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `block in visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:223:in `visit_rule'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:21:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `block in visit_children_without_parent'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `map'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:41:in `visit_children_without_parent'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:30:in `block in visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:61:in `with_parent'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:29:in `visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `block in visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:74:in `visit_root'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:36:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:21:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/base.rb:24:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/visitors/cssize.rb:6:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/root_node.rb:38:in `css_tree'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/tree/root_node.rb:20:in `render'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/engine.rb:275:in `render'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:347:in `update_stylesheet'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:191:in `block in update_stylesheets'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:188:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:188:in `update_stylesheets'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:223:in `watch'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/plugin.rb:108:in `method_missing'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/exec.rb:508:in `watch_or_update'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/exec.rb:346:in `process_result'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/exec.rb:43:in `parse'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/lib/sass/exec.rb:22:in `parse!'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.2/bin/sass:9:in `<top (required)>'
    from /usr/bin/sass:23:in `load'
    from /usr/bin/sass:23:in `<main>'

@nex3
Copy link
Contributor

nex3 commented Jan 10, 2014

What's the contents of the Sass file you're trying to compile?

@Fernker
Copy link
Author

Fernker commented Jan 10, 2014

Do you want me to post the entire thing? (It's 1700 lines long)

@nex3
Copy link
Contributor

nex3 commented Jan 10, 2014

Ideally, narrow it down to as small as you can get it where it still produces the error in question.

@Fernker
Copy link
Author

Fernker commented Jan 10, 2014

Ok I was able to narrow it way down to this chunk of code below. I was able to pull this chunk out and the file compiled fine. I put the chunk in a new file and tried to compile it and got the error mentioned above.

.test{
@at-root{
        #{&}__btns{
            display:block;
            float: right;
            top: 28px;
            margin-top: -28px;
            position: relative;
            z-index: 6;
            .btn.btn--icon{
                margin-left: 7px;
            }
        }
        /* For the Top Chatter Area, it's special */
        #{&}--chatter{
            position: absolute;
            z-index: 9;
            margin-top: 0;
            textarea{
                width: 100%;
            }
        }
    }
}
@Fernker
Copy link
Author

Fernker commented Jan 13, 2014

Did some more digging. It's the CSS comment in there. I imagine that's because it is in an @at-root without actually being in a declaration. If I switch it from /* to // the problem seems to go away.

@chriseppstein
Copy link

I reproduced it. @nex3, the problem is that we need to add a :tabs accessor to the comment node.

nex3 added a commit that referenced this issue Jan 18, 2014
This improves a number of behavioral issues with @at-root.

Closes #1082
@nex3 nex3 closed this as completed Jan 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
3 participants