{"id":8230,"date":"2023-07-17T12:40:46","date_gmt":"2023-07-17T12:40:46","guid":{"rendered":"https:\/\/www.bacancytechnology.com\/qanda\/?p=8230"},"modified":"2023-08-03T06:15:48","modified_gmt":"2023-08-03T06:15:48","slug":"ruby-on-rails-crash","status":"publish","type":"post","link":"https:\/\/www.bacancytechnology.com\/qanda\/ruby-on-rails\/ruby-on-rails-crash","title":{"rendered":"Rails App Crash When Reaching Any Valid Routes"},"content":{"rendered":"<p>If you are facing ruby on rails crash issue in your Rails 6 app, you can try following these steps to resolve it:<\/p>\n<ol>\n<li>Open your Gemfile located in the root directory of your Rails application.<\/li>\n<li>Look for the line that includes gem &#8216;sprockets&#8217; (or similar) and ensure it is present.<\/li>\n<li>If the line is missing, add gem &#8216;sprockets&#8217;, &#8216;3.7.2&#8217; to your Gemfile.<br \/>\n&#8211; If the line is already present, check the version specified. If it&#8217;s not &#8216;3.7.2&#8217;, modify it to &#8216;3.7.2&#8217;.<\/li>\n<li>Save the Gemfile and run the following command in your terminal to install the gem:<\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ bundle install<\/pre>\n<p>Restart your Rails server to ensure the changes take effect.<\/p>\n<p>Or You could use separate compiler for JS and CSS<br \/>\nTry using `yui` for css compile and `uglifier` for js compile<\/p>\n<p>1. Add the following gems in your Gemfile to Compile javascripts and css in production<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&gt; gem 'uglifier'\r\n&gt; gem 'yui-compressor'\r\n<\/pre>\n<p>2. And change the configuration to use the above gems to compile JS and CSS<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&gt; config.assets.css_compressor = :yui\r\n&gt; config.assets.js_compressor = Uglifier.new(harmony: true)\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are facing ruby on rails crash issue in your Rails 6 app, you can try following these steps to resolve it: Open your Gemfile located in the root directory of your Rails application. Look for the line that includes gem &#8216;sprockets&#8217; (or similar) and ensure it is present. If the line is missing, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8468,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-8230","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-on-rails"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts\/8230"}],"collection":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/comments?post=8230"}],"version-history":[{"count":5,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts\/8230\/revisions"}],"predecessor-version":[{"id":8235,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts\/8230\/revisions\/8235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/media\/8468"}],"wp:attachment":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/media?parent=8230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/categories?post=8230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/tags?post=8230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}