From this tutorial
- Set up new Rails app. -T flag skips installation of MiniTest:
$ rails new my_app -T
- Add RSpec to
Gemfile.rb
:
// 1. set dimensions of SVG relative to chart width and window height - navbar | |
let margin = {top: 50, right: 50, bottom: 50, left: 50}, | |
width = $('#chart').width() - margin.left - margin.right, | |
height = window.innerHeight - margin.top - margin.bottom - $('#nav').height(); | |
// 2. create SVG appended to #chart, dimensions come from values set above | |
let svg = d3.select('#chart').append('svg') | |
.attr('width', width + margin.left + margin.right) | |
.attr('height', height + margin.top + margin.bottom) | |
.append('g') |
[From this tutorial](https://medium.com/@ajayramesh/social-login-with-omniauth-and-rails-5-0-ad2bbd2a998e) | |
# 1. Register your app with Google, get credentials and secret | |
# Authorized redirect should be: http://localhost:3000/auth/google_oauth2/callback | |
# enable Google+ API and Contacts API | |
# 2. Include OmniAuth gem in gemfile: | |
# gem ‘omniauth-google-oauth2’ |
# add rack-cors to gem file | |
gem 'rack-cors' |
1. install redis gem file: | |
gemfile.rb -> gem 'redis', '3.3.1' | |
2. bundle install | |
3. include redistogo addon: | |
$ heroku addons:create redistogo | |
(may have to set it up in heroku account dashboard???) | |
4. update cable.yml: |
# add devise gem to Gemfile.rb, go to RubyGems to get latest version # | |
gem 'devise' | |
# Build Devise | |
rails g devise:install | |
# Add correct mailer in development.rb, config method will appear in terminal output after installing | |
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } | |
# Generate Devise views |
From this tutorial
$ rails new my_app -T
Gemfile.rb
:
From this tutorial.
Gemfile.rb:
group :development, :test do
gem 'rspec-rails', '~> 3.5'
From this tutorial
Install basic structure
$ mkdir meet-irl && cd meet-irl
$ touch server.js
$ mkdir app && cd app
$ touch index.html app.js app.css