-
-
Save nitsx2/e9285aa0adab87a1f0cd8f260637a863 to your computer and use it in GitHub Desktop.
ROR_setup at amazon
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment