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

Handle Rails 4 apps without sprockets-rails #867

Closed

Conversation

jcarvalho
Copy link

When building a Rails 4 without sprockets-rails, asset compilation is assumed to always be enabled, which would then cause an exception to be raised when trying to determine whether the sprockets version is vulnerable to CVE-2018-3760.

This PR ensures that Asset Compilation is properly detected as being disabled when the sprockets-rails Gem is absent.

Closes #866.

When building a Rails 4 without `sprockets-rails`, asset compilation is
assumed to always be enabled, which would then cause an exception to be
raised when trying to determine whether the `sprockets` version is
vulnerable to CVE-2018-3760.

This commit ensures that Asset Compilation is properly detected as
being disabled when the `sprockets-rails` Gem is absent.

Closes heroku#866.
@schneems
Copy link
Contributor

Sprockets-rails is a hard dependency of Rails 4 https://rubygems.org/gems/rails/versions/4.2.11.1

@schneems schneems closed this May 21, 2019
@jcarvalho
Copy link
Author

It is indeed a hard-dependency of Rails, but Rails detection is not looking for the rails Gem, but instead by looking for the railties Gem, which does not depend on sprockets-rails: https://rubygems.org/gems/railties/versions/4.2.11.1.

My first approach was to change the detection to look for the rails Gem instead, would that be the way to go here?

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.

Build failure when pushing a Rails 4 App without Sprockets
2 participants