Skip to content

Instantly share code, notes, and snippets.

@adilsoncarvalho
Created January 15, 2011 14:13
Show Gist options
  • Save adilsoncarvalho/780926 to your computer and use it in GitHub Desktop.
Save adilsoncarvalho/780926 to your computer and use it in GitHub Desktop.
Installs git, ruby, gems, sqlite3 and ror on ubuntu
#!/bin/bash
#
# Written by Adilson Carvalho [http://adilsoncarvalho.com.br]
#
USER=`whoami`
if [ "$USER" != 'root' ]; then
sudo $0 || { echo " * Sorry, must be superuser to do that... marmita user not allowed"; exit 1; }
else
echo "Installing mysql to be used with RoR"
apt-get --yes --quiet install mysql-server mysql-client libmysqlclient15-dev
gem install mysql
echo "Done!"
fi
#!/bin/bash
#
# Written by Adilson Carvalho [http://adilsoncarvalho.com.br]
#
USER=`whoami`
if [ "$USER" != 'root' ]; then
sudo $0 || { echo " * Sorry, must be superuser to do that... marmita user not allowed"; exit 1; }
else
echo "I will install Ruby 1.8 and Rails 3 on your Ubuntu"
#
# Installing git because you need to securely version your code
#
echo " * You might need git, so let's install it"
apt-get --yes --quiet install git-core git-doc git-gui gitk openssh-client
#
# Install some dependencies first
#
echo " * We'll build some stuff... (later)"
apt-get --yes --quiet install build-essential
#
# Let's get ruby
#
echo " * Getting ruby"
apt-get --yes --quiet install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 ruby irb
#
# Time for rubygems
#
echo " * Getting rubygems"
apt-get --yes --quiet install rubygems1.8
#
# I love to develop using sqlite...
#
echo " * Getting sqlite3"
apt-get --yes --quiet install sqlite3 libsqlite3-dev libsqlite3-ruby
gem -y install sqlite3-ruby
#
# Wanna debug???
#
echo " * Getting some debug utils"
gem -y install ruby-debug-base
gem -y install ruby-debug-ide
#
# and finally Rails!
#
echo " * Getting Rails 3"
gem -y install rails
echo "Work is done!"
ruby -v
rails -v
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment