ruby on rails - NameError: uninitialized constant Capybara -
i beginner of ruby on rails , doing online assignment: https://drive.google.com/file/d/0bwvt4e6dqqn4zjgwdzfgazzbzve/view
repository: https://github.com/jhu-ep-coursera/fullstack-course1-module3
however, encountered problems (step 5 of getting started in file) when tried started.
the error got shown below:
an error occurred while loading ./spec/recipes_app_spec.rb. failure/error: capybara.default_driver = :poltergeist nameerror: uninitialized constant capybara # ./spec/recipes_app_spec.rb:1:in `<top (required)>' no examples found. finished in 0.00034 seconds (files took 0.23609 seconds load) 0 examples, 0 failures, 1 error occurred outside of examples
how can fix problem? many thanks!!!
it means capybara not available in ruby on rails app. file called "gemfile" inside ror app, , inside gemfile line says:
gem 'capybara'
if don't see need add it. once you've done that, go console, go root directory of ror app , run
bundle install
once you've done that, in test helper file need add line
require 'capybara/rails'
there lot of information capybara available on github page located here: https://github.com/teamcapybara/capybara
Comments
Post a Comment