public
Last active

Script to install Ruby on Rails environment on Ubuntu 8.10

  • Download Gist
install_rails_env
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
# Updating Ubuntu
sudo aptitude update
sudo aptitude --assume-yes dist-upgrade
 
# Installing vim
sudo aptitude --assume-yes install vim vim-gnome
 
# Installing dependencies
sudo aptitude --assume-yes install build-essential
 
# Installing ruby, irb, rdoc, ri and some ruby libs
sudo aptitude --assume-yes install \
irb \
irb1.8 \
libmysql-ruby \
libmysql-ruby1.8 \
libopenssl-ruby \
libopenssl-ruby1.8 \
libreadline-ruby1.8 \
libruby1.8 \
rdoc \
rdoc1.8 \
ri \
ri1.8 \
ruby \
ruby1.8 \
ruby1.8-dev
 
# Creating synbolic links to ruby
sudo ln -s /usr/bin/gem1.8 /usr/local/bin/gem
sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri
sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb
 
# Installing RCov
aptitude install rcov
 
# Installing rubygems
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xzvf rubygems-1.3.1.tgz
cd rubygems-1.3.1
sudo ruby setup.rb
cd ..
rm -f rubygems-1.3.1.tgz
rm -rf rubygems-1.3.1
gem update --system
 
# Installing rails
sudo gem install rails
 
# Installing sqlite3
sudo aptitude install libsqlite3-dev
sudo gem install sqlite3-ruby
 
# Installing mysql
sudo apt-get install --assume-yes \
mysql-server mysql-client \
libmysqlclient-dev libmysqlclient15-dev libmysql-ruby libmysql-ruby1.8
sudo gem install mysql
 
# Installing git
mkdir gitcore
cd gitcore
wget http://kernel.org/pub/software/scm/git/git-1.6.2.1.tar.gz
sudo aptitude --assume-yes install build-dep tk8.5 git-core
tar xzvf git-1.6.2.1.tar.gz
cd git-1.6.2.1/
./configure
make
make install
cd ..
rm -f git-1.6.2.1.tar.gz
rm -rf git-1.6.2.1/
cd ..
rm -rf gitcore/
 
# Installing some gems
sudo gem install rake
sudo gem install capistrano
sudo gem install capistrano-ext
sudo gem install ruby-debug
sudo gem install term-ansicolor
sudo gem install mongrel
sudo gem install fastercsv
sudo gem install rspec rspec-rails
 
# Uncomment this lines if you want to install prawn gem
# sudo gem install prawn prawn-format prawn-layout

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.