jwhitley/requirejs-rails

rake assets:precomile throws a "NoMethodError: undefined method `extension_for_mime_type'..." error.

RusDavies opened this issue · 2 comments

I'm trying to get requirejs-rails working with rails 4.2.1. Example repo is here: https://github.com/RusDavies/rails_4.2.1.

When I run rake assets:precompile, then I get the following error:

NoMethodError: undefined method `extension_for_mime_type' for #<Sprockets::Environment:0x00000002722ea8>
/home/russell/.gem/ruby/bundler/gems/requirejs-rails-dd10bdbbbb52/lib/tasks/requirejs-rails_tasks.rake:92:in `block (3 levels) in <top (required)>'
Tasks: TOP => requirejs:precompile:all => requirejs:precompile:prepare_source
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/usr/bin/ruby /usr/local/bin/rake requirej...]
/home/russell/.gem/ruby/bundler/gems/requirejs-rails-dd10bdbbbb52/lib/tasks/requirejs-rails_tasks.rake:18:in `ruby_rake_task'
/home/russell/.gem/ruby/bundler/gems/requirejs-rails-dd10bdbbbb52/lib/tasks/requirejs-rails_tasks.rake:85:in `block (3 levels) in <top (required)>'
Tasks: TOP => assets:precompile => requirejs:precompile:external
(See full trace by running task with --trace)

Any suggestions would be welcomed. Thanks. :o)

PR #217 contains the fix to this. Will review it in the near future and merge.

Would be great if this issue would be fixed..