jsdf / sprockets-coffee-react

DEPRECATED – Sprockets preprocessor for CJSX (Coffeescript with React JSX markup)
MIT License
85 stars 29 forks source link

fix undefined method `register_engine' #13

Open Zane5 opened 8 years ago

Zane5 commented 8 years ago

under rails 5.0.0.beta3 sprockets (4.0.0.beta2) prockets-rails (3.0.4)

arturtr commented 8 years ago

+1

dbackeus commented 8 years ago

The current deprecation warning for register_engine recommends using register_mime_type with register_compressor or register_transformer. No mention of the register_pipeline used in this PR.

DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
 (called from configure_env at /.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sprockets-coffee-react-4.0.0/lib/sprockets/coffee-react/engine.rb:20)

Is backwards compatibility etc fine with register_pipeline?

ramhoj commented 8 years ago

Tried using this fork in Rails 5.0.0.1 and got /Users/dev/.rvm/gems/ruby-2.2.3/bundler/gems/sprockets-coffee-react-51df6ec37eaa/lib/sprockets/coffee-react/engine.rb:20:inconfigure_env': undefined method register_engine' for #<Sprockets::Environment:0x007fa2642d9c78> (NoMethodError)

ibrahima commented 8 years ago

This is what I ended up doing to make it work #17

Though I haven't yet configured it to generate source maps; not sure how to do so yet. Poking around still...