This is a quick walk through on how to:
- make a contact form in rails 6,
- test it locally, and
- move it into production using heroku and the MailGun addon
This uses the free heroku and mailgun plans. If you get stuck on any part, check the full code here.
FROM ruby:3.0-alpine | |
RUN apk add --no-cache --update \ | |
ack \ | |
bash \ | |
build-base \ | |
curl \ | |
git \ | |
htop \ | |
less \ |
based on DigitalOcean guide
Create local project
local$ rails new appname -T -d postgresql
local$ rails g scaffold Story title:string body:text
local$ rails db:migrate
-
pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
Backup:pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql
Restore:
psql -h localhost -p 5432 -U postgres -d mydb < backup.sql
-h is for host.
-p is for port.
-U is for username.
-d is for database.
Based on this tutorial but simplified and inlined. Particularly removed any Rails and 3rd party services part, assumed you just need deployment to any Ubuntu machine.
- A functional Rails app
- Hosted Git repository (Github, Bitbucket, Gitlab)
- Cloud hosting account (Digital Ocean, Vultr, Linode, Lightsail)
- Local SSH account
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
========================== | |
How Software Companies Die | |
========================== | |
- Orson Scott Card | |
The environment that nurtures creative programmers kills management and | |
marketing types - and vice versa. | |
Programming is the Great Game. It consumes you, body and soul. When | |
you're caught up in it, nothing else matters. When you emerge into |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
Note: I'm currently taking a break from this course to focus on my studies so I can finally graduate