Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What little things do I need to do before deploying a rails application

EDIT

What small things which are too easy to overlook do I need to do before deploying a rails application?

I have set up another question for any task that takes more than a minute or two, and so ought to be scheduled into a deployment process. In this question I'm mostly concerned with on-line config options and similar, that can be done, but are often left out in during the development cycle because they don't make any difference until deployment

like image 863
Laurie Young Avatar asked Sep 19 '08 10:09

Laurie Young


4 Answers

  • Freeze the gems you are using rake gems:unpack
  • Change the secret in config/environment.rb
  • Filter sensitive informtion like passwords: in app/controllers/application.rb filter_parameter_logging :password, :password_confirmation
like image 109
Laurie Young Avatar answered Sep 29 '22 09:09

Laurie Young


  • Ensure the DB is setup on your production server
  • Set up capistrano to deploy your app properly
    • Run a capistrano dry-run
  • Ensure Rails is packed into your vendor/rails folder
  • Ensure all gems are frozen in your app or installed on your prod server
  • Run your tests on the production machine
like image 25
Subimage Avatar answered Sep 29 '22 09:09

Subimage


  • Include google analytics snippet (or other analytics)
like image 39
mloughran Avatar answered Sep 29 '22 11:09

mloughran


  • Check the slow query log, and add any indexes to your models which are causing full-table traverses.

  • Also

    grep -ril FIXME

like image 24
Purfideas Avatar answered Sep 29 '22 10:09

Purfideas