Skip to content

Instantly share code, notes, and snippets.

@mankind
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mankind/3926ea58d2172c260f21 to your computer and use it in GitHub Desktop.
Save mankind/3926ea58d2172c260f21 to your computer and use it in GitHub Desktop.
script to install ruby, rails and nodejs. Run the script.
# install using the line below in your terminal
# wget --no-check-certificate https://gist.githubusercontent.com/mankind/3926ea58d2172c260f21/raw/0b426c12c04f75dc78e51e0b556421070801ddae/rails_nodejs_install.sh && bash rails_nodejs_install.sh
echo "======================================="
echo "========= updating Packages repo ========="
echo "======================================="
sudo apt-get -y update && apt-get upgrade
echo "======================================="
echo "========= Istalling nodejs v0.10.28========="
echo "======================================="
#https://gist.github.com/isaacs/579814
#https://gist.github.com/madhums/3791075
echo 'export PATH=$HOME/.nodejs/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/.nodejs
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/.nodejs
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
echo "====================================="
echo "========tell Rubygems not to install the documentation for each package locally===="
echo "==================================================="
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
echo "======================================="
echo "======= Install Bundler & Rails ======="
echo "======================================="
cd
gem update --system
gem install bundler rails
echo ""
bundle -v
echo ""
rails -v
source ~/.bashrc
echo ""
echo "======================================="
echo " CONGRATULATIONS! "
echo " INSTALLATION COMPLETED! "
echo ""
echo "======================================="
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment