Sonntag, 29. Mai 2011

Using Ruby 1.9.2 and Bundler with Zero-X

In the last few months I was working on bringing Zero-X to Rails 3. The new agent SDK reflects this changes in using now bundler.
In addition to the Rails migration, I ported Zero-X to Ruby 1.9.2. The next tournament on the 25. June 2011 will be the first running fully on 1.9.2. So make sure you're testing your agents in the future against 1.9.2.

For those not familiar with bundler and how to install Ruby 1.9.2, here some steps to get you started:
First we need Ruby 1.9.2. The easiest way to install it is by using RVM (Ruby Version Manager). You can get it by issuing this command in your shell:
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
Next we need the agent SDK, which you can download form the Zero-X website.

Unpack the SDK and change to that directory. You will now be asked to examine the .rvmrc file. This file tells RVM to use a specific Ruby Version within this directory. In our case the file contains:
rvm use 1.9.2
After controlling the file, type "yes". Now RVM is looking for Ruby 1.9.2 and if it doesn't exists, it will prompt you a warning and the instruction how to install it.
rvm install 1.9.2

Next we need bundler. As we installed RVM for the current user, we don't need to use sudo to install gems.
gem install bundler
Bundler can now install all necessary gems and check their dependcies.
bundle
You are set and ready to go:
bundle exec rake
or
bundle exec autotest
Enjoy!

Keine Kommentare: