Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sprockets version check #153

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Borzik
Copy link

@Borzik Borzik commented May 5, 2016

Based on this, we want HandlebarsTemplate to be used for rendering if Sprockets version is 3 or lower.

But in this file, we check if Sprockets version is less than 3, so all Sprockets versions higher than 3.0 will be affected, which causes a bug when asset helpers are not available.

Reduced test case is updated, you can test it now if you want (check Gemfile for versions).

@timherby
Copy link

Ran into this issue as well, and this solution worked for me. Would love to see this merged.

@timherby
Copy link

Unfortunately, after making that change, I'm seeing this deprecation warning:

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 block in register_extensions at /Users/tim/.rvm/gems/ruby-2.1.2/bundler/gems/handlebars_assets-4e653d0bde94/lib/handlebars_assets.rb:22)

So it looks like it might not be that easy. We may need to do the original fix? #152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants