What version of capybara is compatible with Rails 2.3 and Ruby 1.8.7?

1k views Asked by At

I'm trying to install capybara on a setup with Ruby 1.8.7 and Rails 2.3, but I received this message:

capybara requires Ruby version >= 1.9.3.

I have two questions.

The more relevant question:

  • What is the latest capybara version compatible with that setup?

The more important question:

  • How I can check that on my own?
2

There are 2 answers

0
agmcleod On

In your gemfile, specify a version so you can install it. Looking at an REE app i have at work, we're using 1.1.4:

gem 'capybara', '~> 1.1.4'

The ~> with 1.1.x will ensure it always stays at a 1.1.x patch level. Similarly if you use ~> 1.2 it will always stay at a 1.x patch level.

6
Dave Schweisguth On

Regarding Capybara's Ruby version dependency, I went to the capybara source code and read its History. Searching for "Ruby" quickly got me to the statement that Capybara dropped support for Ruby 1.8 in version 2.0.0. So the previous version, 1.1.4, is the most recent version compatible with Ruby 1.8.

Unfortunately that file says nothing about Rails versions. My Rails 2 projects used webrat, so I don't have any personal data points. However, Googling '"rails 2" capybara version' turns up examples of using Capybara 1.1 with Rails 2 (for example in the Cucumber documentation), so the most recent Capybara version that is compatible with your Ruby is also compatible with your Rails.