Friday, February 8, 2008

Moving to Ubuntu, ditching windows

We are trying to install juggernaut, a ruby push server which allows real time conversation with users (something like google chat). However, the gem doesn't seem to work in windows environment, so to hell with it, we are moving our stuff to ubuntu.

why ubuntu? I don't know, it was a random choice :)

if you install ubuntu without internet connection,
the entire source list will be commented out

if that's the case, we need to edit it by doing
~$ sudo vi /etc/apt/sources.list

uncomment all the links inside, save and exit

now we will update the list

Before we start installing rails and all its gems
we need to update our current libs and software to the latest version first

~$ sudo apt-get update
~$ sudo apt-get dist-upgrade (this will take awhile)

now we will install openssh so you can access your box from else where

~$ sudo apt-get install openssh-server openssh-client

we also need subversion to check in our work and install plugins

~$ sudo apt-get install subversion

to install postgres

~$ sudo apt-get install postgresql
~$ sudo apt-get install pgadmin3

~$ sudo su postgres -c psql template1
template1 =# ALTER USER postgres WITH PASSWORD 'something'
template1 =# \q

this will alter the password within the database, now we do the same for ubuntu

~$ sudo passwd -d postgres
~$ sudo su postgres -c passwd

now we setup the postgres admin pack for loggin and monitoring within pgAdmin

~$ sudo su postgres -c psql < /usr/share/postgresq/8.2/contrib/adminpack.sql

now we edit the configuration file

~$ sudo vi /etc/postgresql/8.2/main/postgresql.conf

uncomment password_encryption = on

save with :wq

tired yet? if not, we are now ready to install ruby and rails

to install ruby we do

~$ sudo apt-get install ruby rdoc irb libyaml-ruby libzlib-ruby ri libopenssl-ruby

then we will install rubygems, apt-get will give you version 0.8.x or something outdated, don't panic, we'll get the gem to update itself

~$ sudo apt-get install rubygems
~$ sudo gem update --system

now we'll install rails and it's dependencies

~$ sudo gem install rails --include-dependencies

and that's it, you can pretty much stop here and relax, but for those who wants to install some of the essential gems, please keep reading

everyone know webrick sucks, so we'll install mongrel

~$ sudo apt-get install build-essential
~$ sudo apt-get install ruby1.8-dev
~$ sudo gem install mongrel

in order to connect to the db, we need to install the postgres driver

~$ sudo gem install postgres-pr

for fast debugger, we'll also need ruby-debug-ide

~$ sudo gem install ruby-debug-ide

TzInfo

~$ sudo gem install tzinfo

ImageMagick and RMagick

~$ sudo apt-get install imagemagick
~$ dpkg -l | grep magick (if you don't do this, rmagick won't know it's installed)

~$ sudo apt-get install libmagick9-dev
~$ sudo gem install rmagick -v=1.15.12

and finally for the stuff we want :)
JUGGERNAUT!!!

~$ sudo gem install json
~$ sudo gem install eventmachine
~$ sudo gem install juggernaut

J

No comments: