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

Capybara/Rspec

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,433 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
PRO
Clarissa Lao
Pro 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"