Skip to content

Instantly share code, notes, and snippets.

Ubuntu 12.04, Ruby, Rails, Nginx, Unicorn and git-deploy

In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.

Server Setup

  • Create new server
  • Login to new server
    • ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
    • accept the RSA key
@brobertsaz
brobertsaz / serversetup.md
Last active July 6, 2020 08:56
Ubuntu 12.04 Ruby, Rails, Nginx, Unicorn

Ubuntu 12.04, Ruby, Rails, Nginx, Unicorn and git-deploy

In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.

Server Setup

  • Create new server
  • Login to new server
    • ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
    • accept the RSA key
@nicksoto
nicksoto / androidbuildsetup.0.0.1
Created June 6, 2012 03:29
Android Build Setup for Rhomobile
Tested only on Mac 10.7.4, Core 2 Duo
1.) Go to oracle.com and download the java jdk. My files were output to:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk
2.) gem install rhodes (or sudo gem install rhodes)
3.) Assuming you have Homebrew installed:
brew install qt (this make take an hour to install)
@Pegolon
Pegolon / Repair a corrupt sqlite database
Created March 15, 2011 18:38
If you get an error like SQLite error code:11, 'database disk image is malformed' you can try to dump and reload the database with these commands
cd "$DATABASE_LOCATION"
echo '.dump'|sqlite3 $DB_NAME|sqlite3 repaired_$DB_NAME
mv $DB_NAME corrupt_$DB_NAME
mv repaired_$DB_NAME $DB_NAME