I think you have looked at the tutorial from Mr. Heinemeier Hansson at least once or twice and have a similar setup.
rails new kamal_pg --css tailwind --skip-test --database=postgresql
cd kamal_pg
# This template is inspired on https://github.com/basecamp/audits1984/blob/master/.rubocop.yml | |
# | |
# 1 - Add dependencies to group :development, :test | |
# gem "rubocop", "~> 1.26", require: false | |
# gem "rubocop-performance", require: false | |
# gem "rubocop-rails", require: false | |
# | |
# 2 - Create a file .rubocop.yml and add the lines below | |
# inherit_from: https://gist.githubusercontent.com/lazaronixon/7815d84702f277ead5e89c9f2aa5581f/raw/rubocop.yml | |
# |
DATABASE_HOST=app_name-db | |
DATABASE_USER=postgres | |
DATABASE_PASSWORD=password |
APPLICATION_NAME = app_name | |
WEB_CONTAINER_NAME = $(APPLICATION_NAME)-web | |
.DEFAULT_GOAL := help | |
CONTAINER_APP_MANAGER = docker ## Podman vs Docker | |
# Docker stuff | |
attach: ## Attach running web container to see logs | |
$(CONTAINER_APP_MANAGER) attach $(APPLICATION_NAME)_$(WEB_CONTAINER_NAME)_1 |
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
# Ruby CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-ruby/ for more details | |
defaults: &defaults | |
working_directory: ~/split_app | |
parallelism: 2 | |
docker: | |
- image: circleci/ruby:2.5.0-node-browsers |
## MAKEFILE FOR C PROJECT | |
MYAPP = application | |
HEADERS = $(MYAPP).h | |
OBJECTS = $(MYAPP).o | |
default: $(MYAPP) | |
%.o: %.c $(HEADERS) | |
gcc -c $< -o $@ |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
RYAML = <<-BASH | |
function ryaml { | |
ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' "$@" | |
}; | |
BASH | |
namespace :sync do | |
task :db do | |
isolate do | |
invoke :environment |
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.