Why your all.js is empty on staging or production
When you include a non-existing Javascript file, you probably won't notice it during development. But with caching active (on production or staging) Rails will write an empty all.js
file without complaining.
Related cards:
How to search through logs on staging or production environments
We generally use multiple application servers (at least two) and you have to search on all of them if you don't know which one handled the request you are looking for.
Rails application logs usually live in `/var/www//sh...
Asset pipeline: Reasons why your stylesheet is empty
It might be one of the following:
- You are looking at a manifest file (like
application.css
) which is always empty during development - Your Sass file has a syntax error it did not handle properly
Caching in Rails < 6.1 may down parts of your application when using public cache control
TL;DR When using Cache-Control
on a Rails application, make sure the Vary: Accept
header is set.
Proxy caching is a good feature to serve your publicly visible application content faster and reduce load on your servers. It is e.g. availab...
Haml: Prevent whitespace from being stripped in production
Disclaimer
This is not an issue in newer versions of HAML (starting with 5.0.0), as the ugly
-option was removed so that in development everything is rendered ugly, too.
Problem
When ...
Why your browser loses cookies when following hyperlinks from an Excel spreadsheet or Word document
Microsoft Office pre-fetches hyperlinks using an internal DLL (which doesn't know about your cookies), follows all redire...
Make Sure Your Rails Application is Actually Caching (and not just pretending) - Alfa Jango Blog » Blog Archive
It occurred to me that many Rails/Passenger/Apache applications may have caching set up in a way that it appears to be caching, when it is not actually caching.
Capistrano task to edit staging / production credentials
When using Rails credentials, you will edit the encrypted credentials for staging or production environments from time to time. To do that you need the secret key which should only live on the servers.
Do not download these key files to your ...
Highlight your prompt on production machines
Next in our series on not shooting yourself in the foot: Doing a sudo shutdown -h now on the main database server right before you head home to cook dinner for six.
Asset pipeline may break Javascript for IE (but only on production)
If some of your JavaScripts fail on Internet Explorer, but only in staging or production environments, chances are that JavaScript compression is the culprit.
By default, Rails 3.2 compresses JavaScript with UglifyJS. I have seen a few cases wher...
The Exciter - Why You Should Deploy Your Next Application on Ruby 1.9 and a Rant in General
The rubyforge gems model may not be perfect, but damnit people, when there’s a gem update I know that it has actually been tested somewhat and it’s not just whatever random point HEAD happens to be at, at that point in time, by some random Joe who...