所以我試圖建立我的本地系統來幫助完成一個只使用rails的僱主的現有項目。他們希望我主要關注rspec測試,因爲該項目幾乎可以實現,我需要充實他們錯過的東西。但是,我無法獲得'rake spec'來構建我的測試文件夾。實際上,測試文件夾包含一些使用Selenium的基本用戶登錄測試(我沒有寫它們)。這裏是從錯誤的痕跡:Selenium找不到'spec'文件夾
/opt/local/lib/ruby/gems/1.8/gems/selenium-client-1.2.18/lib/selenium/rspec/spec_helper.rb:2:in 'require': no such file to load -- spec (LoadError)
from /opt/local/lib/ruby/gems/1.8/gems/selenium-client-1.2.18/lib/selenium/rspec/spec_helper.rb:2
from /Users/cliffhess/ampms/spec/integration/user_registration_name_not_blank_spec.rb:5:in 'require'
from /Users/cliffhess/ampms/spec/integration/user_registration_name_not_blank_spec.rb:5
from /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in 'load'
from /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in 'load_spec_files'
from /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in 'map'
from /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in 'load_spec_files'
from /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.5.1/lib/rspec/core/command_line.rb:18:in 'run'
from /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:55:in 'run_in_process'
from /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:46:in 'run'
from /opt/local/lib/ruby/gems/1.8/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:10:in 'autorun'
from /opt/local/lib/ruby/gems/1.8/bin/rspec:19
rake aborted!
事實上,我很確定我明白這個問題(也許?)。 selenium客戶端的spec_helper.rb中的第2行表示require 'spec'
,如果我沒有弄錯,它說硒客戶端應該包含一個名爲spec
的文件夾,其中包含所有rspec文件。硒客戶端沒有這個文件夾,所以我有點困惑,它應該如何要求在第一個文件夾。如果我將該行更改爲require 'rspec'
,則此虛構spec文件夾中還有許多其他引用,這些引用也會導致rake中止。
我正在運行Ruby 1.8.7,Rails 3.0.3和最新版本的selenium。任何幫助都將是驚人的,我一直在堅持搜索這個問題已經有一天了,並且一直沒能找到解決辦法。
服務器沒有ü運行'束install' – Shiv 2011-03-16 22:24:18