Sunday, June 16, 2019

First Principles Thinking

Practice of taking any idea, any concept and then stripping it back to basic, fundamental building blocks that are incontestable, free of subjective bias and can be universally accepted as facts.

You do this by questioning every assumption you think you know about a given problem or scenario and challenging current knowledge that is learned, but not essential and doing this over and over until you get to its most basic roots. You will be able to:

- Think inventively.
- Invent new solutions to old problems.
- Change trajectory of creating from iterating on existing thinking to one of genuine innovation.
- Retain and use knowledge effectively because they understand the fundamental building blocks.

Sunday, March 10, 2019

git error

error: src refspec master does not match any.

This can happen when the files are not committed.

Set the PATH for Ruby in Ubuntu

 cat ~/.bash_profile
export PATH=$PATH:/usr/local/bin

Upgrading Git to Latest Version on Ubuntu

sudo add-apt-repository ppa:git-core/ppa -y
sudo apt-get update
sudo apt-get install git -y
git --version

Tuesday, February 26, 2019

exec: \"/bin/bash\": stat /bin/bash: no such file or directory

docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown.
ERRO[0000] error waiting for container: context canceled 

Resolution:

bash must be installed on the Docker image.

Friday, February 22, 2019

ArgumentError: Missing `secret_key_base` for 'production' environment

set this string with `rails credentials:edit`command, 

Install Ruby 2.6.1 using RVM

rvm get stable
rvm pkg install openssl
rvm install ruby-2.6.1 --with-openssl-dir=$HOME/.rvm/usr

cannot create directory ‘/var/www’

Resolution: create the directory on the server and provide permission to deploy user:
sudo chown deploy:deploy /var/www/

Don't know how to build task 'deploy:updated'

Resolution

In Capfile the require statement sequence matters:

require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rails'

Saturday, February 16, 2019

sqlite3 error in rails 5.2

Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile. (LoadError)

uninstall sqlite3 and

Add:

gem 'sqlite3', '~> 1.3.6'