Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c01/h05/mnt/6385/domains/uhleeka.com/html/blog/wp-content/plugins/uhleeka-codebox/uhleeka-codebox.php on line 65
After creating and launching a VirtualMachine on a Vista Host and installing Ubuntu 8.10 Intrepid Ibex, I executed the following steps to configure my Ubuntu server for Ruby on Rails.
After trying (and failing at the implementation of) several other sets of Ubuntu/Rails howto guides, most of my inspiration came from a Ubuntu/Ruby on Rails install guide that actually works.
sudo aptitude update
Run any distribution upgrades: this step downloaded approximately 100MB and took a few minutes to install;
sudo aptitude --assume-yes dist-upgrade
Now that we are up to date, get a few Rails prerequisites:
– build-essential = “Informational list of build-essential packages”
– ruby = An interpreter of object-oriented scripting language Ruby
– ri = Ruby Interactive reference
– rdoc = Generate documentation from ruby source files
– irb = Interactive Ruby (irb)
sudo aptitude --assume-yes install build-essential 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
Download the latest gems, manually, because aptitude doesn’t appear to be able to get the latest version, etc.
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
Create symlinks: the installer didn’t do it for me, so i had to create them manually;
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
Install rails (takes a while…no status):
sudo gem install rails
Install other gems of interest:
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 annotate-models
Install apache: I’m not totally confident in the necessity of this step since we installed Apache during the Ubuntu install process… but what do i know?
sudo aptitude --assume-yes install \ apache2-mpm-worker \ apache2-prefork-dev \ comerr-dev \ libapr1-dev \ libaprutil1-dev \ libdb4.6-dev \ libexpat1-dev \ libkadm55 \ libkrb5-dev \ libldap2-dev \ libmysqlclient15-dev \ libpcre3-dev \ libpcrecpp0 \ libpq-dev \ libsqlite3-dev \ libssl-dev \ uuid-dev \ zlib1g-dev
My Apache install was not without incident. Although everything appears to be working, I did get the following reponse during the install:
The following packages have unmet dependencies: libapache2-mod-php5: Depends: apache2-mpm-prefork (> 2.0.52) but it is not installable or apache2-mpm-itk but it is not installable The following actions will resolve these dependencies: Remove the following packages: libapache2-mod-php5 php5-mysql