Fix for following issue:
$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
# config/initializers/bulma_form_builder.rb | |
# There are a few things to mention: | |
# 1) See the article at the URL for sample code with screenshots and more information. | |
# URL: https://medium.com/@dyanagi/a-bulma-form-builder-for-ruby-on-rails-applications-aef780808bab | |
# 2) This may not have covered all form controls. | |
# Form builder for Bulma | |
# Reference: https://bulma.io/documentation/form/ | |
class BulmaFormBuilder < ActionView::Helpers::FormBuilder |
FROM ruby:2.6.5-alpine | |
RUN apk add --update --no-cache bash build-base nodejs sqlite-dev tzdata postgresql-dev yarn | |
RUN gem install bundler:2.1.4 | |
WORKDIR /usr/src/app | |
COPY package.json yarn.lock ./ | |
RUN yarn install --check-files |
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
FROM ruby:2.3.1 | |
# Install dependencies | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
# Set an environment variable where the Rails app is installed to inside of Docker image: | |
ENV RAILS_ROOT /var/www/app_name | |
RUN mkdir -p $RAILS_ROOT | |
# Set working directory, where the commands will be ran: |
##################################### | |
# 0. SET UP AWS (ASSUMING YOU HAVE ALREADY SET UP AN ACCOUNT) | |
# CREATE SECURITY GROUP | |
• In the EC2 Dashboard, click Security Groups, then Create Security Group. | |
• Enter Name | |
• Enter Description | |
• Rules to add: | |
- HTTP | |
- SSH |
.git | |
.gitignore | |
/doc | |
.yardoc | |
coverage | |
jsdoc | |
/tmp | |
/log | |
Dockerfile | |
Dockerfile.prod |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.