2. Remove Unwanted Components
If your Rails application has already been created with default configurations (like importmap), you can remove or ignore these parts:
Importmap: Simply don’t use the config/importmap.rb file and avoid pin directives in your application.
Node.js Dependencies: If you’re not using any Node.js packages, you can ignore package.json and yarn.lock or delete them. Rails with Sprockets doesn’t require Node.js unless you use Webpacker or other Node-based tools.
3. Using jQuery
To include jQuery:
//= require jquery
//= require_tree .
4. Using SASS/SCSS and ERB
Sprockets supports SASS/SCSS and ERB out of the box. You can create .scss or .sass files in app/assets/stylesheets and they will be processed by Sprockets.
For ERB, you can use .html.erb templates in your views as usual.
5. Hosting Dependencies Yourself
Ideally the rails generator should ask questions to walk through these options and generate just like Node based frameworks. This would be great enhancement to Rails to make it more developer friendly.
Don’t forget, once you find the right switches and preferred gems for the way you want to build your Rails app you can set them in the .railsrc file so next time you won’t need all those switches and you’ll be able to just do rails new some_app.