Installing mysql2 gem errors on MacOS Mojave.
Make sure openssl is installed on Mac via Homebrew.
brew install openssl
| # encoding: UTF-8 | |
| # This file is auto-generated from the current state of the database. Instead | |
| # of editing this file, please use the migrations feature of Active Record to | |
| # incrementally modify your database, and then regenerate this schema definition. | |
| # | |
| # Note that this schema.rb definition is the authoritative source for your | |
| # database schema. If you need to create the application database on another | |
| # system, you should be using db:schema:load, not running all the migrations | |
| # from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
| # you'll amass, the slower it'll run and the greater likelihood for issues). |
| # download and unpack distribution | |
| sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | |
| sudo mkdir /opt/phantomjs | |
| bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2 | |
| sudo tar -xvf phantomjs-2.1.1-linux-x86_64.tar --directory /opt/phantomjs/ --strip-components 1 | |
| sudo ln -s /opt/phantomjs/bin/phantomjs /usr/bin/phantomjs |
| $ redis-cli | |
| > config set stop-writes-on-bgsave-error no |
| #!/bin/bash | |
| ############################################### | |
| # To use: | |
| # chmod +x install-redis.sh | |
| # ./install-redis.sh | |
| ############################################### | |
| version=5.0.0 |
| $ sudo yum install libxml2-devel | |
| Loaded plugins: fastestmirror, priorities, security | |
| Loading mirror speeds from cached hostfile | |
| amzn-main | 2.1 kB 00:00 | |
| amzn-updates | 2.3 kB 00:00 | |
| Setting up Install Process | |
| Resolving Dependencies | |
| --> Running transaction check | |
| ---> Package libxml2-devel.x86_64 0:2.7.6-4.11.amzn1 set to be updated | |
| --> Processing Dependency: pkgconfig for package: libxml2-devel-2.7.6-4.11.amzn1.x86_64 |
| def preload_association(records) | |
| ::ActiveRecord::Associations::Preloader.new.preload( | |
| records, | |
| @association_schema, | |
| @preload_scope | |
| ).then(&:first).then do |preloader| | |
| next unless @preload_scope | |
| # The result of previous preload is memoized, ActiveRecord won't load this association again. | |
| if preloader.is_a?(::ActiveRecord::Associations::Preloader::AlreadyLoaded) | |
| owner = preloader.send(:owners).first |
| ##### Replace 'example' anywhere with the name of your app and '*ec2ip*' with your ec2 instance ip | |
| ##### Set up your instance and make sure it's security group has ssh, http, and https open inbound and outbound | |
| ##### Don't forget to chmod 400 cert.pem | |
| ##### .deliver/config | |
| APP="example" | |
| BUILD_HOST="*ec2ip*" | |
| BUILD_USER="elixir_builder" | |
| BUILD_AT="/home/$BUILD_USER/edeliver/$APP/builds" |
| # app deps | |
| sudo yum install git | |
| # erlang deps | |
| sudo yum groupinstall "Development Tools" | |
| sudo yum install ncurses-devel openssl-devel | |
| # erlang | |
| wget http://www.erlang.org/download/otp_src_19.2.tar.gz | |
| tar -zxvf otp_src_19.2.tar.gz |
Javascript is a programming language with a peculiar twist. Its event driven model means that nothing blocks and everything runs concurrently. This is not to be confused with the same type of concurrency as running in parallel on multiple cores. Javascript is single threaded so each program runs on a single core yet every line of code executes without waiting for anything to return. This sounds weird but it's true. If you want to have any type of sequential ordering you can use events, callbacks, or as of late promises.