Last active
November 23, 2015 12:59
-
-
Save jun1st/6ba66abd7f5339ca510e to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
set -e | |
echo "Adding PPA for up-to-date Node.js runtime. Give your password when asked." | |
sudo add-apt-repository ppa:chris-lea/node.js | |
echo "Updates packages. Asks for your password." | |
sudo apt-get update -y | |
echo "Installs packages. Give your password when asked." | |
sudo apt-get --ignore-missing install build-essential git-core curl openssl libssl-dev libcurl4-openssl-dev zlib1g zlib1g-dev libreadline-dev libreadline6 libreadline6-dev libyaml-dev libsqlite3-dev libsqlite3-0 sqlite3 libxml2-dev libxslt1-dev python-software-properties libffi-dev libgdm-dev libncurses5-dev automake autoconf libtool bison postgresql postgresql-contrib libpq-dev pgadmin3 libc6-dev nodejs -y | |
echo "Installs ImageMagick for image processing" | |
sudo apt-get install imagemagick --fix-missing -y | |
echo 'install rbenv and ruby' | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
exec $SHELL | |
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash | |
rbenv install 2.2.3 | |
rbenv global 2.2.3 | |
rbenv rehash | |
ruby -v | |
echo "gem: --no-ri --no-rdoc" > ~/.gemrc | |
gem install bundler | |
gem install rails | |
echo -e "\n- - - - - -\n" | |
echo -e "Now we are going to print some information to check that everything is done:\n" | |
echo -n "Should be ruby 2.2.3: " | |
ruby -v | cut -d " " -f 2 | |
echo -n "Should be Rails 4.2.1 or higher: " | |
rails -v | |
echo -e "\n- - - - - -\n" | |
echo "If the versions match, everything is installed correctly. If the versions | |
don't match or errors are shown, something went wrong with the automated process | |
and we will help you do the installation the manual way at the event. | |
Congrats! | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment