Skip to content

Instantly share code, notes, and snippets.

@JazzJackrabbit
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save JazzJackrabbit/0a98c76ff926ce9e4f85 to your computer and use it in GitHub Desktop.

Select an option

Save JazzJackrabbit/0a98c76ff926ce9e4f85 to your computer and use it in GitHub Desktop.

Revisions

  1. JazzJackrabbit renamed this gist Jan 14, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. JazzJackrabbit renamed this gist Jan 14, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. JazzJackrabbit revised this gist Jan 14, 2015. 1 changed file with 10 additions and 4 deletions.
    14 changes: 10 additions & 4 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -20,13 +20,19 @@ rake db:schema:load
    NO_UPDATE_FLAG="--no-update"
    if [ "$1" != "$NO_UPDATE_FLAG" ]; then bin/update; fi

    # -- Update.sh (Rails) ---
    bin/browser &
    script/rails s

    # --- Update.sh (Rails) ---
    #!/bin/sh

    git pull
    bundle install
    rake db:migrate

    # bin/browser &
    script/rails s

    # --- Browser.sh ---
    #!/bin/bash

    sleep 7 # magic number
    launchy http://localhost:3000/

  4. JazzJackrabbit created this gist Jan 14, 2015.
    32 changes: 32 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    # --- Setup.sh (Rails) ---

    ##!/bin/sh

    bundle install

    # set configuration
    cp -n config/database.yml.dist config/database.yml
    echo "- default config copied"
    $EDITOR config/database.yml
    echo "- config is set"

    rake db:create
    rake db:schema:load
    # rake samples:load

    # --- Start.sh (Rails) ---
    #!/bin/sh

    NO_UPDATE_FLAG="--no-update"
    if [ "$1" != "$NO_UPDATE_FLAG" ]; then bin/update; fi

    # -- Update.sh (Rails) ---
    bin/browser &
    script/rails s

    #!/bin/sh

    git pull
    bundle install
    rake db:migrate