CSS is not loading in app

Do you have this in your ProductsController, or if absent, ApplicationController? layout “application” You’ve got a pre-asset pipeline <%= stylesheet_link_tag :all %> somewhere, which normally includes all stylesheets in /public/stylesheets, but it’s telling asset pipeline to look for a file named all.css. Since <%= stylesheet_link_tag :all %> is clearly not in your application.html.erb layout, some … Read more

rails – application.css asset not found in production mode

Rails by default doesn’t serve assets under public. See your production.rb: config.serve_static_assets = true Change that to true and you’re good to go. (Note: you don’t want that to be true in production, remember to change it back before deploying!) See Configuring Rails Applications for details. In rails 6, in the default production.rb there should … Read more

rake assets:precompile RAILS_ENV=production not working as required

Replace rake assets:precompile RAILS_ENV=production with rake assets:precompile (RAILS_ENV=production bundle exec rake assets:precompile is the exact rake task) Since precompilation is done in production mode only, no need to explicitly specify the environment. Update: Try adding the below line to your Gemfile: group :assets do gem ‘therubyracer’ gem ‘sass-rails’, ” ~> 3.1.0″ gem ‘coffee-rails’, “~> 3.1.0” … Read more

javascript_include_tag Rails 4 generating “/javascripts/” instead of “/assets” in production

One of the usage statements for AssetUrlHelper indicates it will produce /javascripts/ urls like what you are seeing: # asset_path “application”, type: :javascript # => /javascripts/application.js (from asset_url_helper.rb line 117 – [1]) This code looks like it can only be reached if the precompiled asset is missing so it would appear that your asset compilation … Read more

Rails 3.1 Assets – Strange Serving in Development

Try adding the following to development.rb: config.serve_static_assets = false …and then clearing your browser cache (update based on comments) The static assets refer to precompiled assets in public/assets, which is where rake assets:precompile puts them. What’s happening is that anything that exists in public/assets will override anything in app/assets if you are serving them. So … Read more

blueprint/screen.css isn’t precompiled

From http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets If you have other manifests or individual stylesheets and JavaScript files to include, you can add them to the precompile array This means that in your config/environments/production.rb, you set config.assets.precompile += %w( blueprint/screen.css blueprint/print.css ) or a catchall: config.assets.precompile += %w( *.css *.js )

require_tree argument must be a directory in a Rails 5 upgraded app

I finally figured it out. So because I am doing the upgrade, RailsDiff didn’t tell me that I was missing something. So the error message wasn’t incorrect, however, what I forgot to do was to create an empty directory. In my app/assets/javascripts/cable.js, I had the following: //= require_tree ./channels However, I forgot to actually create … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)