• Nashville Ruby on Rails Consultant

    I'm local

    We can meet at Fido's, Portland Brew, or Frothy Monkey and talk about your Rails project.

  • Josh Crews

    Who is Josh?

    • A Christian, unexpectedly. Jesus interrupted my plan at 22
    • A husband and new father to two little ones
    • A web-based software developer who loves it
    Read more
  • View Portfolio

    View Portfolio

    Latest Projects

    My latest project is the web development for a new site, Foalio.

    View Portfolio
  • Watch Videos

    Watch Videos

    My process, about, commercials and testimonials

    You'll learn a lot more by watching videos about my software business.

    See More
  • My commercial

    "I need a web developer in Nashville"

    Two dogs discuss how hard it is to find a good web developer in Nashville.

Need help with Ruby on Rails in Nashville? Call me 615-852-6559

Services

  • Build your startup with Rails!

    I have built several Nashville-based web startups. My clients have found me reliable, refreshing and fast.

    • Foalio.com
    • Musikpitch.com
    • Startmysong.com
    • Swingpal.com

    I did all the backend development for Foalio, Musikpitch and Startmysong. For Swingpal I refactored, cleaned up and advanced the project from prototype to launch.

  • Hire a Ruby Consultant

    Do you need:

    • A temporary team member?
    • Someone to rescue your project?
    • Someone to continue to develop your existing project?

    I can be hired hourly, daily or weekly as a Ruby on Rails consultant

  • Rent a Rails Coach

    Want to learn Rails, Agile or XP?

    I can coach/guide you or your team to learn

    • Ruby on Rails
    • Agile development
    • BDD (Behavior Driven Development) / Cucumber
    • eXtreme Programming

    Don't let cost be a factor. I want to help as many learn Rails as possible, so get in touch.

From the Blog

A single dyno on Heroku can process a lot of hits if you tune it

These two settings can massively boost the web traffic handled by a single dyno and increase page load time.

Easiest: HTTP caching on heroku

If you don't have very personalized content on the same URL, you can add a single line to your controller and get a big speed boost.

response.headers['Cache-Control'] = 'public, max-age=300'

It looks like this:

    class MyController < ApplicationController
      def index
        response.headers['Cache-Control'] = 'public, max-age=300'
        @posts = Post.all
      end
    end
  

The 300 in means 300 seconds, and you can change that to whatever you want.

That one line will have heroku serve up a cached version of that url without even talking to Rails. Every 5 minutes (the 300 seconds) it checks back with Rails app and refreshes that page in the cache (when someone goes to that URL)

Docs: http://devcenter.heroku.com/articles/http-caching

Little harder: asset_sync and Rails 3.1

Offload serving up all your site images from Heroku and let it focus on just serving up your pages.

When someone visits you site, heroku gives back a webpage. Simple. But heroku also serves up every css file, js file and image on that page too. So one webpage isn't one request to heroku. Its like 32 (for every css, js, image file).

How many more webpages could heroku serve if it didn't have to also handle the 31 other web requests?

A lot!

So offload those css/js/image files to a CDN (content delivery network). Rails 3.1 and the asset_sync gem make this a lot easier than it used to be.

What you'll need

  • Amazon S3 bucket and keys
  • Rails 3.1+
  • All you css / js / image files in the app/assets directory
  • asset_sync gem

How to do it

  1. Make a bucket on your Amazon S3 for your production site if you haven't already (If you are using something like paperclip for user uploads on heroku, you already have this done.)
  2. Install asset_sync
    1. gem 'asset_sync' in Gemfile
    2. rails g asset_sync:install
  3. Configure config/initializers/asset_sync.rb
    • config.fog_provider = 'AWS'
      mean you are using amazon s3
    • config.aws_access_key_id = 'your_amazon_s3_access_key'
    • config.aws_secret_access_key = 'your_amazon_s3_secret_access_key'
    • config.fog_directory = 'your_bucket_name_for_this_application'
      make sure this bucket exists
  4. Run
    rake assets:precompile
    (you'll know it works if you are seeing files uploaded to amazon)
  5. (install heroku addons:releases if you haven't to save your butt if something goes wrong deploying)
  6. git commit this stuff (you can ignore committing public/assets, its not needed on heroku)
  7. git push heroku master
  8. See if you site loads, and check the source to see if you js/css/image files are pointing to heroku
  9. Having issues? Check out the asset_sync page at github

An example site

I just added these tunes to a client site: http://searchthescriptures.org/ if you want to see an example of this running.

New site launched: http://searchthescriptures.org

Search the Scriptures

I just launched a new site for Search the Scriptures

Search the Scriptures is a Christian resources site and radio broadcast ministry. They run a Christian radio program on the East Coast.

Cool things about this site

  • I listen to this content and content from sites just like it, so it was fun to build.
  • It uses Amazon S3 and Amazon Cloudfront to create streaming radio broadcasts and sermons at a very low cost to the ministry
  • I really like the design
Go to Blog