Monthly Archives: November 2011

Installing Selenium Webdriver on Ubuntu 11

Start by installing rvm. Dealing with ruby on a linux system without it is a nightmare.

RVM – Install

$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Install zlib

rvm pkg install zlib

You may also need to install zlib.

aptitude install zlib1g-dev

or

apt-get install zlib1g zlib1g-dev zlibc

Upgrade to the latest version of Ruby.

rvm install 1.9.2 --with-zlib-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr

Not doing the above resulted in:

    ERROR:  Loading command: update (LoadError)
        no such file to load -- zlib
    ERROR:  While executing gem ... (NameError)
        uninitialized constant Gem::Commands::UpdateCommand

Set Ruby 1.9.2 to be the default version

rvm --default use 1.9.2

Update the System so it has knowledge of all the gems etc.

rvm gem update --system

Install Selenium Web Driver

Network Manager Overrides resolve.cnf

Problem:

Ubuntu Rackspace cloud server can’t access internet via firefox or ping. This occurs after install ubuntu desktop on a rackspace cloud server.

Solution:

Temporary fix: modify resolve.cnf

`sudo vi /etc/resolve.cnf` 

`   nameserver 173.203.4.8
    nameserver 173.203.4.9
`

Permanent fix: disable network-manager or configure it to default set needed name servers.

Installing VNC on an Ubuntu Server

We at NetPlenish are starting to use Selenium more and more, and we are doing it in the “cloud”. One of the first things i wanted to do was be able to watch my tests run on the system. So I needed to install VNC and ubuntu Desktop.

Its very strait forward.

Login as root.

`sudo su -`

Update the apt-get

`apt-get update`

Install ubuntu desktop

`apt-get install ubuntu-desktop`

I picked gnome for my display manager.

`apt-get install gdm`

Update xserver to work with the new gui.

`dpkg-reconfigure xserver-xorg`<p class="more-link-p"> <a href="http://www.markalanevans.com/2011/11/01/installing-vnc-on-an-ubuntu-server/" class="more-link">Read more &rarr;</a></p>