Information Technology Dark Side

Struggles of a Self-Taught Coder

Information Technology Dark Side header image 2

Notes on Deploying Rails

April 12th, 2012 · No Comments

I’m going to update this post as I come up with new stuff – I just want a place to keep common things I need to remember the details for.

Configure garbage collection settings for ruby
Starting with Ruby 1.9.3 you can configure the GC for rails in environment variables. Ruby GC defaults are way too low for rails, so it helps a great deal to bump them up. I use the defaults that come with REE, namely:

Set up Nginx to cache assets for a really long time
Thanks to the new asset pipeline and the precompile step, you can improve asset performance by caching the heck out of your assets. I use Nginx a lot and this is what I put in the config:

location ^~ /assets/ {
 gzip_static on;
 expires max;
 add_header Cache-Control public;

I got this tip from Ryan Bates’ railscast on the asset pipeline, .

That’s all I’ve got for now but hopefully I’ll collect some more bits here over time.

If you enjoyed this post, make sure you subscribe to my RSS feed!
Stumble it!

Tags: Uncategorized

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment