jwhitley / requirejs-rails

RequireJS support for your Rails 3 or 4 application
MIT License
592 stars 202 forks source link

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

Closed RusDavies closed 9 years ago

RusDavies commented 9 years ago

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)

carsomyr commented 9 years ago

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

jankeesvw commented 9 years ago

Would be great if this issue would be fixed..