Speed Up Serving Static Assets on Rails 4.2.5

Background

I am using Moonshine plugin to manage this site on Linode instance.

Steps

Step 1

plugger install git://github.com/railsmachine/moonshine_xsendfile.git

Step 2

In application_manifest.rb:

configure :xsendfile => {:x_send_file_path => rails_root}
recipe :xsendfile

Step 3

In production.rb:

config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache

Here is test performance report using GTmetrix.

GTmetrix


Related Articles


Ace the Technical Interview

  • Easily find the gaps in your knowledge
  • Get customized lessons based on where you are
  • Take consistent action everyday
  • Builtin accountability to keep you on track
  • You will solve bigger problems over time
  • Get the job of your dreams

Take the 30 Day Coding Skills Challenge

Gain confidence to attend the interview

No spam ever. Unsubscribe anytime.