sudo adduser deploy
sudo adduser deploy sudo
visudo
deploy ALL=(ALL:ALL) ALL
su deploy
after follow this to deploy the project first
move listen gem out of development block in Gemfile
gem 'listen', '>= 3.0.5', '< 3.2'
install delivery_boy, racecar and foreman
rvm pkg install openssl
Requirements installation successful.
Fetching openssl-1.0.1i.tar.gz to /Users/user/.rvm/archives
Extracting openssl to /Users/user/.rvm/src/openssl-1.0.1i.....
Configuring openssl in /Users/user/.rvm/src/openssl-1.0.1i....................
Compiling openssl in /Users/user/.rvm/src/openssl-1.0.1i......................
Deploy rails via capistrano-rbenv may have the bundler issue.
bundle: command not found
The following line need to be remove even it is list on the offical doc
# set :rbenv_map_bins, %w{rake gem bundle ruby rails} # Remove this
Install postgres via brew may have the following problem
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"?
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
create a .ruby-version file
2.6.3
Both rvm and rbenv can use this file to switch ruby versions automatically.
change
function_name() {};
to
function_name = () => {};
zookeeper.properties
dataDir={ new_data_dir_instead_of_tmp }/data/zookeeper
server.properties
log.dirs={ new_log_dir_instead_of_tmp }/data/kafka/logs
num.partitions=3 // change this to set default partitions numbers when create topic
map
_.map(users, 'name')
filter
_.filter(users, {name: 'John'}) # get all users whose name is John, return array
OlderNewer