Skip to content

Instantly share code, notes, and snippets.

[info] Running NwreccOrgWeb.Endpoint with cowboy 1.0.4 at 0.0.0.0:4000 (http)
[info] Access NwreccOrgWeb.Endpoint at http://localhost:4000
[info] Application nwrecc_org exited: NwreccOrg.start(:normal, []) returned an error: shutdown: failed to start child: NwreccOrg.Repo
** (EXIT) shutdown: failed to start child: DBConnection.ConnectionPool
** (EXIT) exited in: GenServer.call(Ecto.Repo.Registry, {:associate, #PID<0.944.0>, {Ecto.Adapters.Postgres, %{cache: #Reference<0.3577203260.1166671878.115675>, opts: [timeout: 15000, pool_size: 10, pool: DBConnection.ConnectionPool], pid: #PID<0.945.0>, sql: Ecto.Adapters.Postgres.Connection, telemetry: {NwreccOrg.Repo, :debug, [:nwrecc_org, :repo, :query]}}}}, 5000)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
** (Mix) Could not start application nwrecc_org: NwreccOrg.start(:normal, []) returned an error: shutdown: failed to start chi
@justinbkay
justinbkay / upgrade.md
Created May 10, 2019 17:17 — forked from chrismccord/upgrade.md
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

describe "index" do
setup [:create_user]
test "lists all domains", %{conn: conn, user: user} do
conn =
conn
|> assign(:current_user, user)
IO.inspect conn.assigns.current_user
conn = get conn, domain_path(conn, :index)
require 'minitest/autorun'
class ArrayFlattenTest < Minitest::Test
def test_array_is_flat
test_array = [['one','two',['three']],'four']
array_flatten = ArrayFlatten.new(test_array)
assert array_flatten.flattened == ['one','two','three','four']
end
end
defmodule TamarackpmCom.Router do
use TamarackpmCom.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug TamarackpmCom.AssignUser, repo: TamarackpmCom.Repo
#controller
def index(conn, _params) do
properties = Repo.all(from(p in Property, order_by: p.name, preload: [:community]))
render(conn, "index.html", properties: properties)
end
#template
<td><%= property.community.name %></td>
this errors out if every property doesn't have a community
justin@host1:~/inoutboard$ meteor bundle ../inoutboard.tgz
/home/justin/.meteor/packages/meteor-tool/.1.0.25.2me099++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/main.js:1253
}).run();
^
Error: spawn ENOMEM
at errnoException (child_process.js:1000:11)
at ChildProcess.spawn (child_process.js:947:11)
at exports.spawn (child_process.js:735:9)
at Object.exports.execFile (child_process.js:617:15)
App.ComputersTpmcOfficeController = Ember.ArrayController.extend({
tpmcOfficeActive: function() {
return this.get('model').filterProperty('tpmcOfficeActive', true);
}.property('model.@each.tpmcOfficeActive')
});
App.Router.map(function(){
this.resource('computers', function(){
this.resource('computer', { path:'/:computer_id' }, function(){
this.route('edit');
});
this.route('create');
this.route('nwrecc_office');
this.route('tpmc_office');
this.route('nwrecc_offsite');
this.route('tpmc_offsite');