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'