/instavac

Upload your Holiday pictures! - Sample app for a Ruby Belgium talk

Primary LanguageRuby

  1. Rails setup
  • rails new instavac --skip-coffee --database=postgresql -T
  • rails generate scaffold Post title:string
  1. Setup AWS Account
  • Create a new user for S3 screenshot 1
  • Give it some rights
  • Take those beautiful token and put them in the rails credentials screenshot 2 & 3
  • create bucket (beware of the region!)
  1. ActiveStorage Setup - https://edgeguides.rubyonrails.org/active_storage_overview.html
  • rails active_storage:install
  • Add the mention "has_one_attached :images"
  • storage.yml
  • add gem "aws-sdk-s3", require: false
  1. Touch of CSS
  • gem 'bootstrap', '~> 4.1', '>= 4.1.3'
  • gem 'jquery-rails', '~> 4.3', '>= 4.3.3'
  • mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
  • @import "bootstrap"; //= require jquery3 //= require popper //= require bootstrap

==> COPY VIEWS

  1. Image processing