Skip to content

Error: Asset 'application.css' was not declared to be precompiled in production #458

Closed
@john-999

Description

@john-999

I'm getting the error:

ActionView::Template::Error (Asset 'application.css' was not declared to be precompiled in production.
Declare links to your assets in 'app/assets/config/manifest.js'.

  //= link application.css
and restart your server):

But I have my application.scss (NOT .css) in app/assets/stylesheets and my app/assets/config/manifest.js says:

//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .scss

I'm using:

  • sprockets 4.0.0
  • sprockets-rails 3.2.1
  • rails 6.0.2.1

Temporary solution: Downgrade the gem as follows:

gem 'sprockets-rails', '2.3.3'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions