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

NoMethodError: undefined method `split' for nil:NilClass #15

Closed
KamilLelonek opened this issue Feb 5, 2015 · 6 comments
Closed

NoMethodError: undefined method `split' for nil:NilClass #15

KamilLelonek opened this issue Feb 5, 2015 · 6 comments

Comments

@KamilLelonek
Copy link
Contributor

NoMethodError: undefined method `split' for nil:NilClass
    /Users/squixy/.rvm/gems/ruby-2.2.0/gems/middleman-autoprefixer-2.4.2/lib/middleman-autoprefixer/extension.rb:45:in `call'
    /Users/squixy/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/showexceptions.rb:24:in `call'
    /Users/squixy/.rvm/gems/ruby-2.2.0/gems/rack-rewrite-1.5.1/lib/rack/rewrite.rb:24:in `call'
    /Users/squixy/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/head.rb:13:in `call'
    /Users/squixy/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/lint.rb:49:in `_call'
    /Users/squixy/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/lint.rb:37:in `call'
    /Users/squixy/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:153:in `call'
    /Users/squixy/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/handler/webrick.rb:89:in `service'
    /Users/squixy/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
    /Users/squixy/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
    /Users/squixy/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
@porada
Copy link
Contributor

porada commented Feb 5, 2015

Could you paste your Gemfile? Is this happening with Middleman 4?

@KamilLelonek
Copy link
Contributor Author

Nope, a lots of things don't work with Middleman 4 so I'm not using it yet.

    middleman (3.3.7)
      coffee-script (~> 2.2)
      compass (>= 1.0.0, < 2.0.0)
      compass-import-once (= 1.0.5)
      execjs (~> 2.0)
      haml (>= 4.0.5)
      kramdown (~> 1.2)
      middleman-core (= 3.3.7)
      middleman-sprockets (>= 3.1.2)
      sass (>= 3.4.0, < 4.0)
      uglifier (~> 2.5)
    middleman-autoprefixer (2.4.2)
      autoprefixer-rails (~> 5.1.0)
      middleman-core (>= 3.3.3)

@KamilLelonek
Copy link
Contributor Author

It happens because of 0259f48 especially in

type = headers['Content-Type'].split(';').first
. There's no 'Content-Type' in headers.

@porada
Copy link
Contributor

porada commented Feb 5, 2015

Good catch. Could you make a pull request with the fix?

@KamilLelonek
Copy link
Contributor Author

Done.

@porada
Copy link
Contributor

porada commented Feb 5, 2015

Thanks a lot! Releasing the fix in a few moments.

@porada porada closed this as completed in c58d96c Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants