简体   繁体   中英

rails generator stop working after install rspec,capybara,factorygirl

Hy, this is ad extrat from my Gemfile:

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

now when a run a rails generator command i have this error:

.rvm/gems/ruby-2.0.0-p247@psitoNegozio/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- spec_helper (LoadError)

ADD: same problem when i star passenger server:

[ 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)

i have no idea, can you help me?

The most likely cause is that you are trying to include RSpec from your Rails app. This should never happen; your RSpec tests should include Rails, not the other way around.

The most likely problem I can think of is that you have put your test files somewhere where Rails will automatically load them. That's what the answer in the linked question ultimately would fix. Another possibility is that you have actually typed require "spec_helper" in your Rails code somewhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM