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 username@IPaddress (you can also use the domain name if you have the DNS setup already)
    • accept the RSA key
recovery_tool_version=0.9.2
recovery_tool_linux_version=0.9.2
recovery_tool_update=
name=HP Pavilion Chromebook
version=3701.81.2
desc=HP Pavilion Chromebook
channel=stable-channel
hwid=BUTTERFLY AGAVE A-A 9026
@jab416171
jab416171 / orderlyshutdown
Created June 11, 2013 16:05
Stack Trace Comparison
hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown
at hudson.remoting.Request.call(Request.java:174)
at hudson.remoting.Channel.call(Channel.java:672)
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
at $Proxy118.join(Unknown Source)
at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:915)
at hudson.Launcher$ProcStarter.join(Launcher.java:360)
at hudson.tasks.Ant.perform(Ant.java:217)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
@jab416171
jab416171 / orderlyshutdown
Created June 10, 2013 21:37
OrderlyShutdown Stack Trace
hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown
at hudson.remoting.Request.call(Request.java:174)
at hudson.remoting.Channel.call(Channel.java:672)
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
at $Proxy118.join(Unknown Source)
at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:915)
at hudson.Launcher$ProcStarter.join(Launcher.java:360)
at hudson.tasks.Ant.perform(Ant.java:217)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
{"status":13,"value":{"class":"java.lang.NullPointerException","stackTrace":[{"fileName":"ExternalSessionKey.java","lineNumber":73,"className":"org.openqa.grid.internal.ExternalSessionKey","methodName":"fromWebDriverRequest"},{"fileName":"WebDriverRequest.java","lineNumber":60,"className":"org.openqa.grid.web.servlet.handler.WebDriverRequest","methodName":"extractSession"},{"fileName":"RequestHandler.java","lineNumber":234,"className":"org.openqa.grid.web.servlet.handler.RequestHandler","methodName":"getSession"},{"fileName":"RequestHandler.java","lineNumber":117,"className":"org.openqa.grid.web.servlet.handler.RequestHandler","methodName":"process"},{"fileName":"DriverServlet.java","lineNumber":84,"className":"org.openqa.grid.web.servlet.DriverServlet","methodName":"process"},{"fileName":"DriverServlet.java","lineNumber":62,"className":"org.openqa.grid.web.servlet.DriverServlet","methodName":"doGet"},{"fileName":"HttpServlet.java","lineNumber":707,"className":"javax.servlet.http.HttpServlet","methodName":"se
I/Adreno200-EGL(24350): <eglInitialize:269>: EGL 1.4 QUALCOMM build: Nondeterministic AU_full_mako_PARTNER-ANDROID/JB-MR1-DEV_CL2961380_release_AU (CL2961380)
I/Adreno200-EGL(24350): Build Date: 12/10/12 Mon
I/Adreno200-EGL(24350): Local Branch:
I/Adreno200-EGL(24350): Remote Branch: m/partner-android/jb-mr1-dev
I/Adreno200-EGL(24350): Local Patches: NONE
I/Adreno200-EGL(24350): Reconstruct Branch: NOTHING
D/OpenGLRenderer(24350): Enabling debug mode 0
private static class ASyncUpload extends AsyncTask<FileInputStream, Integer, String> {
private NotificationManager mNotifyManager;
private NotificationCompat.Builder mBuilder;
public DocumentUploadAsync(Context ctxt) {
mNotifyManager =
(NotificationManager) ctxt.getSystemService(Context.NOTIFICATION_SERVICE);
mBuilder = new NotificationCompat.Builder(ctxt);
mBuilder.setContentTitle("File Upload")
.setContentText("Upload in progress");
}
@jab416171
jab416171 / instructions.txt
Last active December 16, 2015 11:58
Installing Linux on the Chromebook Pixel
These directions are provided AS-IS, if you lose all of your data or
brick your machine, it's not my problem.
Quick pre-requisites:
A) You should (optionally) have a USB mouse you can plug into the
Pixel for when you first boot into Linux as the touchpad and
touchscreen won't work at the beginning.
You can forego this bit and work from the VC console instead
@jab416171
jab416171 / hexdump
Created April 21, 2013 01:59
Yahoo Login Hexdump
00 00 00 00 00 00 59 43 : 48 54 00 00 01 00 00 00 ......YCHT......
00 01 00 00 01 7F 41 73 : 6B 46 6F 72 42 6F 6F 7A ......AskForBooz
65 C0 80 61 68 6F 6C 65 : 2C 61 68 6F 6C 65 73 2C e..ahole,aholes,
61 73 73 68 6F 6C 65 2C : 61 73 73 68 6F 6C 65 73 asshole,assholes
2C 61 73 73 77 69 70 65 : 2C 62 69 61 74 63 68 2C ,asswipe,biatch,
62 69 74 63 68 2C 62 69 : 74 63 68 65 73 2C 62 6C !@$,!@$es,bl
6F 5F 6A 6F 62 2C 62 6C : 6F 77 5F 6A 6F 62 2C 62 o_job,blow_job,b
6C 6F 77 6A 6F 62 2C 63 : 6F 63 6B 73 75 63 6B 65 lowjob,cocksucke
72 2C 63 75 6E 74 2C 63 : 75 6E 74 73 2C 64 69 63 r,!@$,!@$s,dic
6B 68 65 61 64 2C 66 75 : 63 6B 2C 66 75 63 6B 65 khead,!@$,!@$e
@jab416171
jab416171 / kern.log
Created April 19, 2013 19:53
Computer locked up Apr 19
Apr 19 07:54:28 joe-Pixel kernel: [ 4.169477] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
Apr 19 07:54:28 joe-Pixel kernel: [ 4.169516] snd_hda_intel 0000:00:1b.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Apr 19 07:54:28 joe-Pixel kernel: [ 4.169732] snd_hda_intel 0000:00:1b.0: irq 43 for MSI/MSI-X
Apr 19 07:54:28 joe-Pixel kernel: [ 4.169761] snd_hda_intel 0000:00:1b.0: setting latency timer to 64
Apr 19 07:54:28 joe-Pixel kernel: [ 4.176386] industrialio: module is from the staging directory, the quality is unknown, you have been warned.
Apr 19 07:54:28 joe-Pixel kernel: [ 4.178459] isl29018: module is from the staging directory, the quality is unknown, you have been warned.
Apr 19 07:54:28 joe-Pixel kernel: [ 4.187804] init: plymouth-splash main process (1160) terminated with status 1
Apr 19 07:54:29 joe-Pixel kernel: [ 4.577487] ------------[ cut here ]------------
Apr 19 07:54:29 joe-Pixel kernel: [ 4.577508] WARNING: at /build/buildd/linux-3.2.0/drivers