Last active
June 12, 2017 19:23
-
-
Save jmbejar/d57bc424ee12f1727559caeae72f5add to your computer and use it in GitHub Desktop.
Instalación de entorno Ruby on Rails en Ubuntu
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
# Instalación de requerimientos | |
sudo apt-get update -y | |
sudo apt-get upgrade -y | |
sudo apt-get -y remove ruby | |
sudo apt-get install -y git postgresql postgresql-contrib libpq-dev nodejs heroku | |
sudo apt-get autoremove -y | |
# Instalar Ruby 2.4.1 | |
wget -O ruby-install-0.6.1.tar.gz https://github.com/postmodern/ruby-install/archive/v0.6.1.tar.gz | |
tar -xzvf ruby-install-0.6.1.tar.gz | |
cd ruby-install-0.6.1/ | |
sudo make install | |
sudo ruby-install --system ruby 2.4.1 | |
source ~/.bashrc | |
sudo gem install bundler | |
# Instalación de ChromeDriver | |
wget -N http://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip -P ~/ | |
unzip ~/chromedriver_linux64.zip -d ~/ | |
rm ~/chromedriver_linux64.zip | |
sudo mv -f ~/chromedriver /usr/local/share/ | |
sudo chmod +x /usr/local/share/chromedriver | |
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver | |
# Configurar password para Postgres | |
## Ejecutamos este comando que nos deja en una consola de postgres | |
sudo -u postgres psql postgres | |
## Dentro de esa consola escribimos este comando | |
\password postgres | |
## Salimos de esa consola con lo siguiente | |
\q | |
## Abrimos el siguiente archivo con el Text Editor de Ubuntu | |
sudo gedit /etc/postgresql/9.3/main/pg_hba.conf | |
## y allí debemos localizar una linea que tiene los valores "local all postgres peer" | |
## y cambiar "peer" por "md5" | |
## y por último reiniciamos postgres con este comando: | |
sudo service postgresql restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment