You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the skim gem to convert hamljs templates to slim using the .jst.skim extension. It works perfectly but Sprockets as of version 3.7.0 deprecated the register_engine call in favor of a different approach using register_mime_type and either register_compressor or register_transformer.
It shows that they added a deprecation notice in the 3.7.0 section in the release notes
This is the exact error I'm getting:
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 <top (required)> at /Users/myusername/.rvm/gems/ruby-2.3.0/gems/skim-0.10.0/lib/skim/sprockets.rb:3)
From what I can find, there is no simple way to get around this deprecation warning due to the fact that version 3.7.0 deprecates the functionality but still requires you to use it :|
I would write something along these lines to fix the registering issue, however the Skim::Template class cannot handle Sprockets 4 yet (which is still in beta at the time of writing). Either way it might give you some inspiration!
@mohsintahir the last commit was on 8th of July 2016, it's been stale for quite a while. Your best chance would be to look at forks to see if anyone continued maintenance.
Hello there!
I'm using the
skim
gem to converthamljs
templates to slim using the.jst.skim
extension. It works perfectly but Sprockets as of version 3.7.0 deprecated theregister_engine
call in favor of a different approach usingregister_mime_type
and eitherregister_compressor
orregister_transformer
.register_mime_type
andregister_transformer
register_transformer
should lookIt shows that they added a deprecation notice in the
3.7.0
section in the release notesThis is the exact error I'm getting:
From what I can find, there is no simple way to get around this deprecation warning due to the fact that version 3.7.0 deprecates the functionality but still requires you to use it :|
I would write something along these lines to fix the registering issue, however the
Skim::Template
class cannot handle Sprockets 4 yet (which is still in beta at the time of writing). Either way it might give you some inspiration!Replicating this issue should be simple.
In a fresh Rails (5, using sprockets >= 3.7.0) app,
Gemfile
Run the
bundle
orbundle install
commandRestart rails server (ctrl+c to stop
rails s
to start)The message should appear when starting the server, if not try creating a template
The text was updated successfully, but these errors were encountered: