Skip to content

Instantly share code, notes, and snippets.

@rahulpuroht
Last active September 13, 2018 21:04
Show Gist options
  • Save rahulpuroht/b739fcb38c99b52d31616feb7f879553 to your computer and use it in GitHub Desktop.
Save rahulpuroht/b739fcb38c99b52d31616feb7f879553 to your computer and use it in GitHub Desktop.
ROR_setup at amazon
1. sudo apt-get update
2. sudo apt-get install curl
3. Install RVM -
\curl -sSL https://get.rvm.io | bash
4. source ~/.rvm/scripts/rvm
5. rvm install 2.1.5
6. gem install rails --version=4.2.2
7. gem install passenger
8. sudo apt-get install libcurl4-openssl-dev
9. Adding SWAP -
sudo dd if=/dev/zero of=/swap bs=1M count=1024
sudo mkswap /swap
sudo swapon /swap
10. rvmsudo passenger-install-nginx-module
11. apt-get install git
12. sudo apt-get install libpq-dev
13. RAILS_ENV=production rake db:create db:migrate
14. https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis
15.For database Error at bundle installation
http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
16.Postgres Instalation
https://help.ubuntu.com/community/PostgreSQL
sudo apt-get updatesudo apt-get install postgresql postgresql-contrib
sudo -u postgres psql postgres
17. 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
For node js problem
http://stackoverflow.com/questions/26320901/cannot-install-nodejs-usr-bin-env-node-no-such-file-or-directory
18 Edit in sudo vi conf/nginx.conf file these line
location / {
root /home/ubuntu/cellevolutionlabcccrossplatformandroidapplication-15082378-ror/public;
passenger_enabled on;
index index.html index.htm;
}
To start with Rails :
tail -f /opt/nginx/logs/error.log
tail -f log/sidekiq.log
sudo git pull origin-dev develop_ankit
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