Skip to content

Instantly share code, notes, and snippets.

@tneems
tneems / upgrade-postgres-9.5-to-9.6.md
Created July 6, 2017 20:17 — forked from Prototype-X/upgrade-postgres-9.5-to-9.6.md
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04

TL;DR

Install Postgres 9.6, and then:

sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main

Set db path for pg_upgradecluster:

class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
@tneems
tneems / gist:2092752
Created March 19, 2012 03:18 — forked from dnordstrom/gist:1536797
Command line progress of Spree upgrade/migration
##
# Command line logging during Spree 0.11 to 1.0.0.rc1 migration.
# (Skipping source control commands.)
##
Sites
> rvm gemset create asgseedbank-1.0.0rc
Sites
> rvm gemset use asgseedbank-1.0.0rc
@tneems
tneems / passenger_standalone.rb
Created February 5, 2012 00:03 — forked from reu/passenger_standalone.rb
Capistrano recipe for passenger standalone
set :rails_env, "production"
set :passenger_port, 9292
set :passenger_cmd, "#{bundle_cmd} exec passenger"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && #{passenger_cmd} start -e #{rails_env} -p #{passenger_port} -d"
end
task :stop, :roles => :app, :except => { :no_release => true } do