Skip to content

Instantly share code, notes, and snippets.

@DanielTheFirst
Created February 17, 2011 03:17
Show Gist options
  • Save DanielTheFirst/830889 to your computer and use it in GitHub Desktop.
Save DanielTheFirst/830889 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# Install ruby on rails
#
# Author : Daniel Reslie
# Date : 2/15/2011
#
RUBY_VERSION = 1.9.2-p136
LOCAL_USER = daniel
# install a couple tools to make the server usable
sudo apt-get install gcc make vsftpd ssh
# install the mysql database. you will prompted to provide a root password along the way.
sudo apt-get install mysql-server mysql-client
#install all the prereqs for what we are going to install/build/run
sudo apt-get install zlibc zlib1g zlib1g-dev build-essential libssl0.9.8 libssl-dev libzlib-ruby libmysqlclient-dev libmysql-ruby
# download and compile ruby source
cd /home/${LOCAL_USER}
# install ruby
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-${RUBY_VERSION}.tar.gz
tar -zxf ruby-${RUBY_VERSION}.tar.gz
cd ruby-${RUBY_VERSION}
./configure
make
sudo make install
# now to install rails
gem install rails
# this takes awhile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment