Last active
October 21, 2017 09:51
-
-
Save kolosek/2bebe9af1f9cb3fe282182afdee8bd5b to your computer and use it in GitHub Desktop.
Latest rails installation script for Ubuntu 16.04
This file contains hidden or 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
echo "Updates packages. Asks for your password." | |
sudo apt-get update -y | |
echo "Installs packages. Give your password when asked." | |
sudo apt-get install -y curl nodejs libcurl4-gnutls-dev git-core libxslt1-dev libxml2-dev libsqlite3-dev libgmp-dev libmysqlclient-dev git git-doc libncurses5-dev build-essential rake libqt4-dev libqtwebkit-dev openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config libv8-dev libmagickwand-dev libreadline-dev libedit-dev libgdbm-dev libffi-dev zlib1g-dev rake curl vim libgmp3-dev phantomjs imagemagick | |
echo "Setting up mysql" | |
sudo apt-get install -y mysql-server mysql-client | |
echo "Setting up postgres" | |
#sudo apt-get install postgresql-9.3 pgadmin3 postgresql-contrib-9.3 postgresql-server-dev-9.3 | |
sudo apt-get install postgresql-9.5 pgadmin3 postgresql-contrib-9.5 postgresql-server-dev-9.5 postgis postgresql-9.5-postgis-2.2 -y | |
echo "Installs RVM (Ruby Version Manager) for handling Ruby installation" | |
echo insecure >> ~/.curlrc | |
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - | |
\curl -sSL https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
echo "Saving rvm function into bashrc" | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc | |
source ~/.bashrc | |
echo "Installs Ruby" | |
rvm install 2.4.1 | |
rvm use 2.4.1 --default | |
gem install bundler --no-rdoc --no-ri | |
gem install rails --no-rdoc --no-ri | |
echo "Congrats! You are all set with Ruby and MySQL/Sqlite" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment