Installing Cucumber and Selenium on Ubuntu

If you start with a clean Ubuntu installation, start off doing a system update:

sudo apt-get update && sudo apt-get upgrade

To make sure everything runs perfectly, install the required packages using this command:

sudo apt-get install curl git git-core zlib1g-dev zlibc libxml2-dev libxslt1-dev

Install RVM or install ruby and rubygems. This is the easiest way to install. You can also opt to install from the package manager, and should you succeed to get it working, let me know the steps you've followed in the comments.

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc

Install the packages for RVM called openssl and zlib

rvm pkg install openssl zlib

Install the 1.9.2 version of Ruby:

rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr

and now use the 1.9.2 version of ruby in RVM

rvm use 1.9.2

Now you ought to have a working version of Ruby. Run this:

gem install cucumber -v=0.10.6
gem install capybara -v=0.4.1.2
gem install gherkin -v=2.4.21 
gem install headless -v=0.2.2 
gem install rspec -v=2.7.0 
gem install selenium-webdriver -v=2.8.0
gem install xpath -v=0.1.4

Just leave a comment if you encounter any other problems.

Comments

Hmm,

Seems like you will also need these packages: make bzip2

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.