Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Set up Git and Add Gems


why we have to install capybara/rspec . What is benefit of using this gems for this Odot app?

2 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

It's an alternative testing suite for Rails apps. The default one uses minitest and this one uses RSpec. It's just a matter of preference, some companies/developers prefer the former, some prefer the latter (http://words.steveklabnik.com/rails-has-two-default-stacks). I personally like RSpec with Capybara tests because they read more naturally. The creator of Rails seems to hate RSpec (http://www.rubyinside.com/dhh-offended-by-rspec-debate-4610.html).

Clarissa Lao
Clarissa Lao
Courses Plus Student 2,849 Points

I have the same problem, I just resolved it on my mac.

If "could not find gem error" , go directly to the site and copy and paste code to be placed on Gemfile and on Sumblime text, Installing manually: eg:

  1. to install rspec-rails go to: https://rubygems.org/gems/rspec-rails/versions/3.2.1
  2. pick out a version you want, copy code for Gemfile to the gemfile : gem 'rspec-rails', '~> 3.2.1'
  3. copy code for install and paste to terminal: gem install rspec-rails -v 3.2.1
  4. try to "bundle" on terminal again

you can repeat this for the capybara using google "install capybara gem"