Last active
June 4, 2021 11:11
-
-
Save neeraj5511/434c0d6177a8f58f8030b75ea9b36b15 to your computer and use it in GitHub Desktop.
Ruby on rails complete setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install curl | |
Install RVM - | |
\curl -sSL https://get.rvm.io | bash | |
source ~/.rvm/scripts/rvm | |
rvm install 2.6.0 | |
gem install rails --version=5.2.3 | |
sudo apt-get install libcurl4-openssl-dev | |
sudo apt-get install libpq-dev | |
gem install passenger | |
rvm sudo passenger-install-nginx-module | |
## install git | |
sudo apt-get install git | |
## create db | |
RAILS_ENV=production rake db:create | |
## If you have dump file and you want to restore that database | |
psql -d database_name -h localhost -U username of your postgres < path of your dump file | |
rails db:migrate | |
rails db:seed | |
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis | |
Postgres Instalation | |
https://help.ubuntu.com/community/PostgreSQL | |
sudo apt-get update | |
sudo apt-get install postgresql postgresql-contrib | |
sudo -u postgres psql postgres | |
Node Js and Npm installation | |
(Use all command with sudo user) | |
sudo apt-get update | |
sudo apt-get install nodejs | |
npm install -g npm@1.4.3 (for specific version) | |
For forvever command not command : npm install forever -g | |
To start with Rails : | |
tail -f /opt/nginx/logs/error.log | |
tail -f log/sidekiq.log | |
## check ubuntu history | |
history | |
sudo fuser -k 80/tcp | |
cd /opt/nginx/sbin/ | |
sudo ./nginx | |
cd /home/SimlesApp/ | |
sidekiqctl stop tmp/pids/sidekiq.pid | |
clockworkd -c lib/clock.rb stop | |
sidekiq start -d -L log/sidekiq.log -P tmp/pids/sidekiq.pid -e production | |
clockworkd -c lib/clock.rb start -l | |
For Redis INstallation | |
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis | |
Error For Tep Dir non existent | |
https://stackoverflow.com/questions/24462738/rails-could-not-find-a-temporary-directory-argumenterror?lq=1 | |
chmod +t /tmp | |
for postgres 10 | |
https://tecadmin.net/install-postgresql-server-on-ubuntu/ | |
Regarding Master Key Issue | |
https://github.com/rails/rails/issues/31397 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment