Skip to content

undefined method `bytesize' for nil:NilClass #50

@brumm

Description

@brumm

Rack::Utils.bytesize blows up if the master stylesheet is empty.

NoMethodError - undefined method `bytesize' for nil:NilClass:
  rack (1.6.0) lib/rack/utils.rb:361:in `bytesize'
  sprockets (2.12.3) lib/sprockets/bundled_asset.rb:29:in `initialize'
  sprockets (2.12.3) lib/sprockets/base.rb:377:in `build_asset'
  sprockets (2.12.3) lib/sprockets/index.rb:94:in `block in build_asset'
  sprockets (2.12.3) lib/sprockets/caching.rb:58:in `cache_asset'
  sprockets (2.12.3) lib/sprockets/index.rb:93:in `build_asset'
  sprockets (2.12.3) lib/sprockets/base.rb:287:in `find_asset'
  sprockets (2.12.3) lib/sprockets/index.rb:61:in `find_asset'
  sprockets (2.12.3) lib/sprockets/environment.rb:75:in `find_asset'
  sprockets (2.12.3) lib/sprockets/base.rb:295:in `[]'
  sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:230:in `lookup_asset_for_path'
  sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:190:in `check_errors_for'
  sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:89:in `asset_path'
  actionview (4.2.0) lib/action_view/helpers/asset_url_helper.rb:267:in `stylesheet_path'
  actionview (4.2.0) lib/action_view/helpers/asset_tag_helper.rb:100:in `block in stylesheet_link_tag'
  actionview (4.2.0) lib/action_view/helpers/asset_tag_helper.rb:96:in `stylesheet_link_tag'
  sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:170:in `stylesheet_link_tag'
  css_splitter (0.4.1) app/helpers/css_splitter/application_helper.rb:18:in `block in split_stylesheet_link_tag'
  css_splitter (0.4.1) app/helpers/css_splitter/application_helper.rb:7:in `split_stylesheet_link_tag

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions