Monday, January 17, 2011

Ruby/Rails on Ubuntu

For apt-get to install packages on a new Ubuntu install, first run update: apt-get update

sudo apt-get install curl
sudo apt-get install build-essential (installs libraries required to compile C programs/make)
sudo apt-get install zlib1g-dev libreadline5-dev libssl-dev libxml2-dev
sudo apt-get install ruby1.8
ruby1.8 -ropenssl -rzlib -rreadline -e "puts:Hello"
sudo apt-get install rubygems
sudo gem install rails (rails script is found in /var/lib/gems/1.8)
export PATH=/var/lib/gems/1.8/bin/:$PATH

sudo apt-get install ruby1.8-dev << this package is essential for building ruby native extensions.

sudo apt-get mysql-server mysql-client
libmysql-ruby: This is an API module that allows to access MySQL database from programs in Ruby.
libmysqlclient-dev: package includes development libraries and header files for MySQL
sudo apt-get libmysql-ruby libmysqlclient-dev
gem install mysql

sudo apt-get apache2
sudo gem install passenger
sudo passenger-install-apache2-module

No comments:

Post a Comment