Skip to content

Instantly share code, notes, and snippets.

View happypeter's full-sized avatar
🐶
Wait for U

Peter Wang happypeter

🐶
Wait for U
View GitHub Profile
@happypeter
happypeter / Traps.markdown
Created September 12, 2012 07:33 — forked from billie66/nginx.conf
Deploy Rails on Ubuntu server 12.04 with Nginx, Unicorn, Mysql
  1. the default index.html does not work well in prodution mode, so do not borther to config that, just delete it and go on.

  2. To put things in production mode, do

     rails g scaffold items name:string
     rake db:migrate RAILS_ENV=production
     rm public/index.html
     #change route.rb point root to items#index
     rake assets:precompile
     sudo service nginx restart
    

./config/unicorn_init.sh stop