created new Ruby on Rails4 app
~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ rails new rails_app_name
$ cd rails_app_name
$ rvm --create --ruby-version use ruby-2.0@rails_app_name
$ bundle
$ echo -e "\n# Ignore db config \n/config/database.yml" >> .gitignore
$ echo THE-TO-DO-LIST: >> ~LIST.todo
$ subl .
~~~~~~~~~
$ git init
$ git flow init
$ git flow feature start Setup

> update README

$ git commit -a -m "created new Ruby on Rails4 app"
~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Update Rails Version ?
$ rvm get stable
$ rvm list known
$ rvm install 2.0
$ rvm use 2.0
$ rvm gemset use rails4 --create
$ gem install rails
$ rvm list
$ ruby -v
$ rails -v
~~~~~~~~~~~~~~~~~~~~~~~~~~~
setup GemfileEnv & 'pow'
~~~~~~~~~
> setup pow      (http://pow.cx/)
$ curl "https://gist.github.com/TheEricMiller/5392720/raw" -o ".powrc"

> updated Gemfile organization
$ curl "https://gist.github.com/TheEricMiller/bcd294cc53aad4c0a475/raw" -o "Gemfile"

$ bundle
installed 'thin', 'quiet_assets', 'awesome_print', 'better_errors' & RailsPanel
~~~~~~~~~
+ Gemfile ...
+ ~ gem 'thin'
+ ~ gem 'quiet_assets'
+ ~ gem 'awesome_print'
+ ~ gem 'better_errors'
+ ~   gem 'binding_of_caller'
+ ~ gem 'meta_request'  # http://goo.gl/7ToXW
$ bundle
installed 'figaro'
~~~~~~~~~
+ Gemfile ~ gem 'figaro'

$ bundle
$ rails g figaro:install
$ curl "https://gist.github.com/TheEricMiller/5390663/raw" -o "config/~application.example.yml"
$ cp -f config/~application.example.yml config/application.yml

> edit config/application.yml

> setup action_mailer for use with figaro
$ curl "https://gist.github.com/TheEricMiller/6191801/raw" -o "config/initializers/act_mail_init.rb"

> test in rails c
~> ActionMailer::Base.mail(:from => "mailman@theericmiller.com", :to => "test@gmail.com", :subject => "test", :body => "test").deliver
installed 'haml-rails', 'bootstrap-sass', 'compass-rails', 'simple_form'
~~~~~~~~~
+ Gemfile ...
+ ~ gem 'haml-rails'
+ ~ gem 'bootstrap-sass'
+ ~ gem 'compass-rails'
+ ~ gem 'simple_form'
$ bundle
generated 'welcome' controller
~~~~~~~~~
$ rails g controller welcome index
> config/routes.rb ~ root :to => 'welcome#index'
setup database with example YAML configuration
~~~~~~~~~
$ curl "https://gist.github.com/TheEricMiller/5390682/raw" -o "config/~database.example.yml"
$ cp -f config/~database.example.yml config/database.yml

> Update Database Type (PICK ONE)
+ Gemfile...
+ ~ gem 'sqlite3'
+ ~ gem 'pg'
+ ~ gem 'mysql2'
$ bundle

> edit config/database.yml

$ rake db:setup
Merge branch 'feature/Setup' into develop
Setup GitHub Origin, Heroku Production & Database
~~~~~~~~~~~~~~~~~~~~~~~~~~~
### SETUP GITHUB
> Create GitHub Repo via https://github.com/new/
$ git remote add origin https://github.com/your-username/rails_app_name.git
$ git push --all origin

~~~~~~~~~~~~~~~~~~~~~~~~~~~
### SETUP HEROKU
$ heroku login
$ cd ~/rails_app_name
$ heroku create rails-app-name --remote production
$ heroku create rails-app-name-stage --remote staging
$ git config heroku.remote staging
$ heroku config:set RACK_ENV=staging RAILS_ENV=staging --remote staging

~~~~~~~~~~~~~~~~~~~~~~~~~~~
### RELEASE STEPS
$ git flow feature finish -k Setup

$ git flow release start 0.0.1
$ git push staging release/0.0.1:master
$ rake figaro:heroku
$ heroku config
> Confirm config settings
$ heroku run rake db:migrate

~~~ > TEST TEST TEST @ RAILS-APP-NAME-STAGE.herokuapp.com
~~~ > make necessary changes...
~~~ ... like > ruby & gem 'rails_12factor' > $ bundle
~~~ $ git commit -a -m "FIX > these issues stopping release"
~~~ $ git push staging release/0.0.1:master
... do this until successfully running on stage/prod server
$ git flow release publish 0.0.1
~~~ ... do this often during a hardening process so that others developers have access to try, test, and fix issues with this release version
~~~ ... when everything is in its right place ...

$ git flow release finish -k 0.0.1
$ git push production master
$ rake figaro:heroku[rails-app-name]
$ heroku run rake db:migrate --remote production

$ heroku restart
$ heroku open

~~~~~~~~~~~~~~~~~~~~~~~~~~~
### (OPTIONAL) Setup AWS RDS MySQL Database
> Confirm Heroku is Granted AWS RDS Remote Access
$ heroku config:get DATABASE_URL
$ heroku addons:add amazon_rds url=mysql2://masteruser:pass@dbinstance.123endpoint321.amazonaws.com/databasename
$ heroku config:get DATABASE_URL
> Confirm New Database Settings

### NOTES ~ https://devcenter.heroku.com/articles/multiple-environments
installed 'rails_12factor', included 'bin' gitignore & set ruby version
~~~~~~~~~
+ Gemfile …
~ ruby '2.0.0'
~ gem 'rails_12factor'
$ bundle

$ echo -e "\n# Include bin directory \n\x21/bin/" >> .gitignore
Merge branch 'release/0.0.1'