2013-10-25 73 views
0

海蘭,這是從我的Gemfile廣告extrat:軌發電機停止工作後安裝rspec的,水豚,factorygirl

#Gemfile 
gem 'rspec-rails' 
gem 'capybara' 
gem 'factory_girl_rails' 

現在,當運行一個Rails生成器命令我有這樣的錯誤:

.rvm/gems/[email protected]/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- spec_helper (LoadError) 

ADD:當我出演乘客服務器同樣的問題:

[ 2013-10-25 17:26:43.4976 8776/7f8c6a60f700 Pool2/Spawner.h:738 ]: [App 8808 stdout] 
[ 2013-10-25 17:26:46.3407 8776/7f8c6a60f700 Pool2/Implementation.cpp:849 ]: Could not spawn process for group /home/cristiano/Dropbox/railsProject/sitoNegozio#default: An error occured while starting up the preloader. 
    in 'void Passenger::ApplicationPool2::SmartSpawner::handleErrorResponse(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:455) 
    in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:558) 
    in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:206) 
    in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:744) 
    in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const Passenger::ApplicationPool2::SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:782) 

[ 2013-10-25 17:26:46.3411 8776/7f8c53fff700 agents/HelperAgent/RequestHandler.h:1956 ]: [Client 20] Cannot checkout session. An error occured while starting up the preloader. 
Error page: 
cannot load such file -- spec_helper (LoadError) 

我不知道,你能幫幫我嗎?

+0

可能的重複http://stackoverflow.com/questions/5150293/in-require-no-such-file-to-load-spec-helper – MrYoshiji

+0

在我看來這個問題不是重複的 – user1066183

回答

0

最可能的原因是您試圖從Rails應用中包含RSpec。這絕不應該發生;你的RSpec測試應該包含Rails,而不是其他的方式。

我能想到的最可能的問題是你已經把你的測試文件放在Rails會自動加載它們的地方。這就是關聯問題中的答案最終會解決的問題。另一種可能是你實際上在你的Rails代碼中輸入了require "spec_helper"