#    Copyright (C) 2011  Quiliro Ordóñez

#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.

#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

#    quiliro [at] fsfla [dot] org

echo Updating the APT Database...
sudo apt-get update
echo APT Group installation...
sudo apt-get -y install wget curl build-essential bison openssl zlib1g libxslt1.1 libssl-dev libxslt1-dev libxml2 libffi-dev libyaml-dev libxslt-dev autoconf libc6-dev libreadline6-dev zlib1g-dev libcurl4-openssl-dev libmysqlclient16-dev libmysqlclient16 imagemagick libmagick9-dev git-core mysql-server
echo WGet Ruby Language...
wget -c ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
echo UnZip Ruby Language...
tar -xzf ruby-1.9.3-p0.tar.gz
echo Change to Ruby Language Directory...
cd ruby-1.9.3-p0
echo Configure Ruby Language for Compilation...
sudo ./configure --prefix=/usr/local 
echo Compiling the Ruby Language files...
sudo make 
echo Installing the Ruby Language...
sudo make install
echo Adding something to the path?
source ~/.bashrc
echo Using Gem to Install Bundler and Passenger
sudo gem install bundler passenger
echo Using Bundler to install MySQL2
sudo bundle install mysql2
echo Using Gem to install Hobo
sudo gem install hobo

