【发布时间】:2011-03-16 19:43:57
【问题描述】:
基本上我刚开始学习在 Rails 3 上使用 Selenium,我从 Selenium IDE 开始并生成了 RSpec 格式的脚本
在运行此脚本之前,我已经为 selenium-client、Selenium、selenium-rails 和 selenium-webdriver 安装了 gems
但是当我使用 rspec 命令运行这个脚本时,我得到了
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `require': no such file to load -- spec (LoadError)
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `rescue in require'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-client-1.2.18/lib/selenium/rspec/spec_helper.rb:2:in `<top (required)>'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Users/qsang/Desktop/Code/NextBigThing/spec/Selenium/create_new_user.rb:5:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `block in load_spec_files'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `map'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `load_spec_files'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/command_line.rb:18:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:55:in `run_in_process'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:46:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:10:in `block in autorun'
我已经尝试寻找答案,我发现的唯一一个与我接近的案例是Selenium Can't Find 'spec' Folder,目前还没有人回答。
谁能帮帮我,在此先感谢。
【问题讨论】:
标签: ruby-on-rails-3 selenium rspec