$ gem install rails
$ rails new oath_provider_sample
$ cd oath_provider_sample
$ git init .
$ git add .
$ git commit -m 'Initial commit'
$ echo "gem 'pg'" >> Gemfile
$ bundle
$ cat > config/database.yml <<EOF
development:
adapter: postgresql
database: oath_development
host: localhost
test:
adapter: postgresql
database: oath_development
host: localhost
EOF
$ rake db:create
url: https://github.com/plataformatec/devise#getting-started
$ echo "gem 'devise'" >> Gemfile
$ bundle
$ rails generate devise:install
$ cat > config/initializers/action_mailer.rb <<EOF
Rails.application.configure do
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
end
EOF
$ rails g devise:views
$ rails generate devise User
$ rake db:migrate
$ vim config/routes.rb # Uncomment or add `root to: "welcome#index"`
$ rails generate controller Welcome index
$ rm test/fixtures/users.yml
$ rake
$ rake routes # Yoou should see devise routes
url: https://github.com/doorkeeper-gem/doorkeeper
$ echo "gem 'doorkeeper'" >> Gemfile
$ bundle
$ rails generate doorkeeper:install
$ rails generate doorkeeper:migration
$ rake db:migrate
$ rake routes # You should see default routes for oath
$ vim config/initializers/doorkeeper.rb # Add devise auth: `current_user || warden.authenticate!(:scope => :user)`
$ vim app/controllers/welcome_controller.rb # Add restriction filter: `before_action :doorkeeper_authorize!`
url: https://github.com/emberjs/ember-rails
$ cat >> Gemfile <<EOF
gem 'ember-rails'
gem 'ember-source', '1.5.0' # or the version you need
EOF
$ bundle
$ rails g ember:bootstrap -g --javascript-engine coffee