I hereby claim:
- I am fongfan999 on github.
- I am fongfan999 (https://keybase.io/fongfan999) on keybase.
- I have a public key ASAGuim3XRqDxYHLCi2OtkBsYUX0bCBNplitMOmCCtSY2Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| (function(d, s, id) { | |
| var js, fjs = d.getElementsByTagName(s)[0]; | |
| if (d.getElementById(id)) return; | |
| js = d.createElement(s); js.id = id; | |
| js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.1&appId=YOUR_APP_ID&autoLogAppEvents=1"; | |
| fjs.parentNode.insertBefore(js, fjs); | |
| }(document, "script", "facebook-jssdk")); | |
| document.addEventListener("DOMContentLoaded", () => { | |
| let fbRoot; |
| - # app/views/comments/_comment.html.slim | |
| li data-controller="comment" data-action="click->comment#hello" | |
| = "#{comment.message} by #{comment.user.email}" |
This gist will collect 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-testHere are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.
| #!/bin/sh | |
| # Set up Rails app. Run this script immediately after cloning the codebase. | |
| # Exit if any subcommand fails | |
| set -e | |
| # Copy over configs | |
| if ! [ -f .env ]; then | |
| cp .sample.env .env |
| 1) Stop docker: service docker stop. Verify no docker process is running ps faux | |
| 2) Double check docker really isn't running. Take a look at the current docker directory: ls /var/lib/docker/ | |
| 2b) Make a backup - tar -zcC /var/lib docker > /mnt/pd0/var_lib_docker-backup-$(date +%s).tar.gz | |
| 3) Move the /var/lib/docker directory to your new partition: mv /var/lib/docker /mnt/pd0/docker | |
| 4) Make a symlink: ln -s /mnt/pd0/docker /var/lib/docker | |
| 5) Take a peek at the directory structure to make sure it looks like it did before the mv: ls /var/lib/docker/ (note the trailing slash to resolve the symlink) | |
| 6) Start docker back up service docker start |
| # A sample Gemfile | |
| source "http://rubygems.org" | |
| gem "redis" | |
| gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git' | |
| gem "em-hiredis" | |
| # gem "em-synchrony" | |
| gem "em-websocket" |
| upstream myapp_puma { | |
| server unix:/tmp/myapp_puma.sock fail_timeout=0; | |
| } | |
| # for redirecting to https version of the site | |
| server { | |
| listen 80; | |
| rewrite ^(.*) https://$host$1 permanent; | |
| } | |