I follow Michael Hartle's ruby ββon rails tutorial to test the sample application (3.2.1 Test-driven development), but I get the following error after entering bundle exec rspec spec/requests/static_pages_spec.rb
/home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver/common/zipper.rb:1:in `require': cannot load such file -- zip/zip (LoadError) from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver/common/zipper.rb:1:in `<top (required)>' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver/common.rb:9:in `require' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver/common.rb:9:in `<top (required)>' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver.rb:29:in `require' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/selenium-webdriver-2.0.0/lib/selenium/webdriver.rb:29:in `<top (required)>' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/selenium-webdriver-2.0.0/lib/selenium-webdriver.rb:1:in `require' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/selenium-webdriver-2.0.0/lib/selenium-webdriver.rb:1:in `<top (required)>' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require' from /home/rahul/Downloads/rails_projects/sample_app/config/application.rb:12:in `<top (required)>' from /home/rahul/Downloads/rails_projects/sample_app/config/environment.rb:2:in `require' from /home/rahul/Downloads/rails_projects/sample_app/config/environment.rb:2:in `<top (required)>' from /home/rahul/Downloads/rails_projects/sample_app/spec/spec_helper.rb:3:in `require' from /home/rahul/Downloads/rails_projects/sample_app/spec/spec_helper.rb:3:in `<top (required)>' from /home/rahul/Downloads/rails_projects/sample_app/spec/requests/static_pages_spec.rb:1:in `require' from /home/rahul/Downloads/rails_projects/sample_app/spec/requests/static_pages_spec.rb:1:in `<top (required)>' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run' from /home/rahul/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
Here is the code from spec/requests/static_pages_spec :
require 'spec_helper' describe "Static pages" do describe "Home page" do it "should have the content 'Sample App' " do visit '/static_pages/home' expect(page).to have_content('Sample App') end end end
Gemfile :
source 'https://rubygems.org' ruby '2.0.0'
routes.rb :
SampleApp::Application.routes.draw do get "static_pages/home" get "static_pages/help" end
OS : Ubuntu 13.04
I searched for a solution but did not find it. Please keep in mind that I am new to Ruby on Rails and web development.
ruby ruby-on-rails rspec
Rahul Roy Sep 01 '13 at 6:49 2013-09-01 06:49
source share