Images and assets not working in production server

Here are a few problems that you might be having:

1 - Your production configuration may not be correct. This is particularly likely if you started out with an early 3.1 release candidate, and have been updating along the way. The suggested options for production.rb changed quite a bit between rc4 and the 3.1.0 release.

Make sure that your production.rb settings include:

# Disable Rails‘s static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Don‘t fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true

2 - You may have forgotten to precompile your assets

RAILS_ENV=production rake assets:precompile

3 - You may have forgotten to restart your web server to pick up the changes in production.rb.

Images and assets not working in production server

时间: 2024-10-24 11:24:03

Images and assets not working in production server的相关文章

DTA3:Reduce the Production Server Tuning Load

tuning recommendations 是DTA提供的优化建议. 引用MSDN:Reduce the Production Server Tuning Load DTA relies on the query optimizer to analyze a workload and to make tuning recommendations. Performing this analysis on the production server adds to the server load

SQL Server四个“系统数据库”作用的简介

master.model.msdb.tempdb简称为“3M1T”,在后续的版本选择安装不同的组件后也有其他系统级数据库,如ReportServer.Distribution等,本次主要介绍3M1T数据库. [master数据库]:master数据库是SQL Server中最重要的数据库,记录了SQL Server系统中所有的系统信息,包括登入账户.系统配置和设置.服务器中数据库的名称.这些数据库文件的位置.系统进程. linked server及SQL Server初始化信息等.一旦数据库文件

[React] Configure a React & Redux Application For Production Deployment and Deploy to Now

In this lesson, we’ll make a few small changes to our scripts and add some environment variables that will be used at build time to get our application ready to be deployed to a production environment using the now service. Once properly configured,

Enabling Active Directory Authentication for VMWare Server running on Linux《转载》

Enabling Active Directory Authentication for VMWare Server running on Linux Version 0.2 - Adam Breidenbaugh - 2007-06-29 Purpose The purpose of this guide is as follows: Document the steps necessary to enable Active Directory Authentication on a Linu

009.Working with SQL Server LocalDB --【在sql server localdb 上操作数据】

Working with SQL Server LocalDB 在sql server localdb 上操作数据 2017-3-7 2 分钟阅读时长 本文内容 1.SQL Server Express LocalDB SQL Server Express LocalDB  sql server 的一个简化免费版本 2.Seed the database 初始化数据库的初始表数据 By Rick Anderson The MvcMovieContext object handles the ta

Put your application in production

Here some simple tips to optimize your application for production. Configure your application.conf First off, the best way to specify production mode is to give a specific ID to your production framework. Let’s pick production as an example. Refer ma

vue - src(assets和static)

描述:这里存放一些本地资源(images.css.js). assets:开发服务器(dev Server时引用的临时路径) static:静态资源存放(build Server). 原文地址:https://www.cnblogs.com/cisum/p/9612639.html

Introducing .NET Core

At connect(), we announced that .NET Core will be entirely released as open source software. I also promised to follow up with more details on .NET Core. In this post, I’ll provide an overview of .NET Core, how we’re going to release it, how it relat

Overview & Change Log

Overview & Change Log Nova Framework is a PHP 5.5+ MVC Framework. It's designed to be lightweight and modular, allowing developers to build better and easy to maintain code with PHP. To this end Nova does not come with lots of built in libraries / he