ruby '3.0.1'
'rails', '~> 6.1.2'
I am dropping Webpacker from a rails project. I assume it was originally created using rails new
with the webpacker flag to generate it but I do not know for sure. All I've done so far was remove yarn, browersify, babel, and etc source files and then moved all of my javascripts and stylesheets to app/assets
and app/vendor
.
I also added this to application.html.erb
:
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => "reload" %>
<%= javascript_include_tag "application", "data-turbolinks-track" => "reload" %>
For a while, things were working. I was correcting paths, fixing small errors, and etc. Then after I restarted the server once, I was given a new error and now I'm stuck.
Sprockets::Rails::Helper::AssetNotPrecompiled in Universes#index
Showing /var/app/app/views/layouts/application.html.erb where line #8 raised:
application.css
Here's what I know so far:
app/assets/stylesheets/application.scss
instead.stylesheet_link_tag
call, I get a similar one for application.js
.Any help would be appreciated. Thank you.
Lam Phan had what I needed. My assets/config/manifest.js
was not configured correctly. I restored it to:
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
and then made sure application.scss
and application.js
were at those paths. It was all easy after that. Thank you very much for your time.