In order to get the cucumber features to work, the following was one on Ubuntu:
sudo apt-get install rubygems libqt4-dev xvfb
sudo gem install rubygems-update
sudo update_rubygems
sudo gem install capybara cucumber capybara-webkit rspec test headless