cityindex/logsearch — pull request #312 by mrdavidlaing (2014-01-21 11:10:15+00:00)
Title: Remove ruby 1.8 when upgrading to ruby 1.9

@sopel and myself bumped into an issue running `rake` with a fresh build of our Vagrant logsearch VMs

```
vagrant@vagrant-ubuntu-precise-64:/app/app$ rake -T
rake aborted!
undefined method `require_relative' for main:Object
/app/app/srv/logstash/Rakefile:1
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/default_loader.rb:6:in `load'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:663:in `load_imports'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:596:in `raw_load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:89:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:72:in `run'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
(See full trace by running task with --trace)
```

Turns out that whilst ruby 1.9 was installed, ruby 1.8's gems were still being installed.

see `update-alternatives --query gem`

To fix an existing box run:

```
sudo apt-get remove libruby1.8 ruby1.8 ruby1.8-dev rubygems1.8
sudo gem install bundle --no-ri --no-rdoc
cd /app/app && bundle install
```

This PR removes ruby 1.8 when installing ruby 1.9, and should thus fix the issue for new Vagrant boxes