Deploying to Production Notes

  1. To run the DB migrate scripts you must specify that you are using the production configuration. One simple way to do this is:

    rake RAILS_ENV='production' db:migrate

  2. Make the public/dispatch.* scripts executable. If you developed originally in Windows then you need to change the first line in each of these dispatch scripts from

    #!e:/ruby/bin/ruby

    to

    #!/usr/bin/ruby1.8

  3. Enable FastCGI (CGI is ridiculously slow) by changing .htaccess. Change this line

    RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

    to

    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

  4. Change the public and log directories to mode 755 (not sure if this is necessary but seems like good practice).

    chmod 755 public
    chmod 755 log

Leave a Reply

Your email address will not be published. Required fields are marked *