I had this same issue when working on a Rails 6 application in Ubuntu 20.04. and ran rake assets:precompile again and everything was in working order. I downgraded my sprockets-rails gem to 2.3.3. I found the error: Asset `application.css` was not declared to be precompiled in production Thank you for the suggestion to look in the heroku logs. Whereas in development everything loads as expected. When I run rails server in production I get this error: ActionController::RoutingError (No route matches "/stylesheets/application.css"):ĪctionController::RoutingError (No route matches "/javascripts/application.js"): I restored the website from an earlier deployment on Heroku so at least its alive for now but I have not resolved the issue of how to update since none of my images appear to be compiling. # Use default logging formatter so that PID and timestamp are not suppressed.Ĭonfig.log_formatter = ::Logger::Formatter.new # Disable automatic flushing of the log to improve performance. # Send deprecation notices to registered listeners.Ĭonfig.active_precation = :notify # the fault_locale when a translation can not be found). # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # config.action_mailer.raise_delivery_errors = false # Set this to true and configure the email server for immediate delivery to raise delivery errors. # Ignore bad email addresses and do not raise email delivery errors. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # config.action_controller.asset_host = "" # Enable serving of images, stylesheets, and JavaScripts from an asset server. # Use a different cache store in production. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different logger for distributed setups. # Prepend all log lines with the following tags. # Set to :debug to see everything in the log. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # Specifies the header that your server uses for sending files. # Version of your assets, change this if you want to expire all your assets. # Do not fallback to assets pipeline if a precompiled asset is missed. # Disable Rails's static asset server (Apache or nginx will already do this). # config.action_dispatch.rack_cache = true # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. ![]() # Add `rack-cache` to your Gemfile before enabling this. # Enable Rack::Cache to put a simple HTTP cache in front of your application # Full error reports are disabled and caching is turned on.Ĭnsider_all_requests_local = falseĬonfig.action_controller.perform_caching = true # Rake tasks automatically ignore this option for performance. # and those relying on copy on write to perform better. # your application in memory, allowing both thread web servers ![]() # Settings specified here will take precedence over those in config/application.rb. Instead of all the images i have in my assets/images folder I notice that after running assets:precompile RAILS_ENV=productionĪ new public/assets folder was created but only contains three files: I am not a professional programmer by any stretch. Any help would be appreciated, I have put a lot of work into this website and it used for medical professionals around the world. ![]() I have tried tinkering with the production.rb configuration file but have made no progress. Unfortunately now all my assets are dead.Įverything works as expected in development when I start a rails server and go to localhost:3000 I ended up running rake assets:clobber and tried to rebuild my assets with rake assets:precompile. I recently updated my app to rails 5.2.3 (from 4.0.1) and noticed that when I added a new image to assets/images it failed to display in production.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |