Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Can't run rake assets:precompile, "undefined method `hexdigest' for nil:NilClass" #101

@FrenchDilettante

Description

@FrenchDilettante

Hello folks,

I try to precompile my assets but it doesn't work and the error is not quite talkative...
I first thought it was because of my .htpl files I use for Backbone, but they are declared in my config/application.rb file:

    # Pass template files to requirejs
    config.requirejs.logical_asset_filter += [/\.htpl$/]

When I run rake assets:precompile, I've got:

/usr/local/rvm/rubies/ruby-1.9.3-p374/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p374/bin/rake requirejs:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
undefined method `hexdigest' for nil:NilClass
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/requirejs-rails-0.9.1/lib/requirejs/rails/builder.rb:19:in `digest_for'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/requirejs-rails-0.9.1/lib/tasks/requirejs-rails_tasks.rake:122:in `block (5 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/requirejs-rails-0.9.1/lib/tasks/requirejs-rails_tasks.rake:122:in `sub'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/requirejs-rails-0.9.1/lib/tasks/requirejs-rails_tasks.rake:122:in `block (4 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/requirejs-rails-0.9.1/lib/tasks/requirejs-rails_tasks.rake:119:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/requirejs-rails-0.9.1/lib/tasks/requirejs-rails_tasks.rake:119:in `block (3 levels) in <top (required)>'
Tasks: TOP => requirejs:precompile:all => requirejs:precompile:digestify_and_compress
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/usr/local/rvm/rubies/ruby-1.9.3-p374/bin/...]
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/actionpack-3.2.11/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/requirejs-rails-0.9.1/lib/tasks/requirejs-rails_tasks.rake:85:in `block (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile => requirejs:precompile:external
(See full trace by running task with --trace)

And to be honest, I don't know where to start...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions