If you are facing ruby on rails crash issue in your Rails 6 app, you can try following these steps to resolve it:

  1. Open your Gemfile located in the root directory of your Rails application.
  2. Look for the line that includes gem ‘sprockets’ (or similar) and ensure it is present.
  3. If the line is missing, add gem ‘sprockets’, ‘3.7.2’ to your Gemfile.
    – If the line is already present, check the version specified. If it’s not ‘3.7.2’, modify it to ‘3.7.2’.
  4. Save the Gemfile and run the following command in your terminal to install the gem:
$ bundle install

Restart your Rails server to ensure the changes take effect.

Or You could use separate compiler for JS and CSS
Try using `yui` for css compile and `uglifier` for js compile

1. Add the following gems in your Gemfile to Compile javascripts and css in production

> gem 'uglifier'
> gem 'yui-compressor'

2. And change the configuration to use the above gems to compile JS and CSS

> config.assets.css_compressor = :yui
> config.assets.js_compressor = Uglifier.new(harmony: true)

 

Support On Demand!

Ruby on Rails