RSpec and Hydra : "no such file to load -- rspec"
shock opened this issue · 2 comments
Hi - I am using bundler 1.0.0 in my rails 2.3.5 app with RSpec and I have gone through the setup as described in the "Getting Started" Wiki page.
My rake file:
require the hydra codebase
require 'rubygems'
require 'hydra'
require the hydra rake task helpers
require 'hydra/tasks'
Hydra::TestTask.new('hydra:para' => ['environment']) do |t|
t.add_files 'spec/__spec.rb'
t.verbose = true
end
Hydra::TestTask.new('hydra:serial' => ['environment']) do |t|
t.add_files 'spec/lib/tpsi/__spec.rb'
t.serial = true
t.verbose = true
end
task :hydra => ['hydra:para', 'hydra:serial']
When I run "RAILS_ENV=test rake hydra", I get the following output:
Loading bundler environment...
DEPRECATION WARNING: require "activesupport" is deprecated and will be removed in Rails 3. Use require "active_support" instead.. (called from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/activesupport.rb:2)
RAILS_ENV: test
ENVIRONMENT INVOKED with /opt/ree/bin/rake
1283370597.54386 MASTER| Initialized
1283370597.54396 MASTER| Files: (["spec/spec_helper_spec.rb"])
1283370597.54401 MASTER| Workers: ([{"type"=>"local", "runners"=>2}])
1283370597.54403 MASTER| Verbose: (true)
Hydra Testing [> ] 0/11283370597.54447 MASTER| Booting 1 workers
1283370597.5446 MASTER| worker opts {"type"=>"local", "runners"=>2}
1283370597.54467 MASTER| Booting local worker
1283370597.55527 MASTER| Processing Messages
1283370597.55565 MASTER| Workers: [{:type=>:local, :pid=>99843, :io=>#<Hydra::Pipe @reader=#IO:0x501b828, @writer=#IO:0x501cd2c>, :idle=>false}]
1283370597.55684 MASTER| Listening to {:type=>:local, :pid=>99843, :io=>#<Hydra::Pipe @reader=#IO:0x501b828, @writer=#IO:0x501cd2c>, :idle=>false}
1283370597.56579 WORKER| Booting 2 Runners
1283370597.58258 WORKER| 2 Runners booted
1283370597.58334 WORKER| Processing Messages
1283370597.59384 MASTER| got message: #Hydra::Messages::Worker::WorkerBegin:0x50077c4
1283370597.60178 RUNNER| Booted. Sending Request for file
1283370597.60458 RUNNER| Processing Messages
1283370597.60678 WORKER| Received Message from Runner
1283370597.60766 WORKER| #Hydra::Messages::Runner::RequestFile:0x4fe7c80
1283370597.60807 MASTER| got message: #Hydra::Messages::Worker::RequestFile:0x500639c
1283370597.60832 MASTER| Sending "spec/spec_helper_spec.rb"
1283370597.60906 WORKER| Received Message from Master
1283370597.60916 WORKER| #<Hydra::Messages::Master::RunFile:0x4fe7118 @file="spec/spec_helper_spec.rb">
1283370597.61033 RUNNER| Received message from worker
1283370597.61041 RUNNER| #<Hydra::Messages::Worker::RunFile:0x4ff98cc @file="spec/spec_helper_spec.rb">
1283370597.61044 RUNNER| Running file: spec/spec_helper_spec.rb
1283370597.61367 RUNNER| Booted. Sending Request for file
1283370597.61418 RUNNER| Processing Messages
1283370597.61449 WORKER| Received Message from Runner
1283370597.61454 WORKER| #Hydra::Messages::Runner::RequestFile:0x4fe6470
1283370597.61473 MASTER| got message: #Hydra::Messages::Worker::RequestFile:0x50058ac
1283370597.61477 MASTER| No more files to send
1283370597.62201 WORKER| Received Message from Runner
1283370597.62228 WORKER| #<Hydra::Messages::Runner::Results:0x4fe5a0c @output="no such file to load -- rspec", @file="spec/spec_helper_spec.rb">
1283370597.62284 MASTER| got message: #Hydra::Messages::Worker::Results:0x5005514
1283370597.62321 MASTER| 0 Files Remaining
no such file to load -- rspec
Hydra Testing [##############################>] 1/11283370597.6436 MASTER| Shutting down all workers
Hydra Testing [##############1283370597.64435 WORKER| Received Message from Master
##########>] 1/1
1283370597.64446 WORKER| #Hydra::Messages::Master::Shutdown:0x4fe514c
1283370597.64501 WORKER| Notifying 2 Runners of Shutdown
1283370597.64506 WORKER| Sending Shutdown to Runner
1283370597.64539 WORKER| {:pid=>99844, :io=>#<Hydra::Pipe @reader=#IO:0x5007b84, @writer=#IO:0x5007bc0>, :idle=>true}
1283370597.64575 RUNNER| Received message from worker
1283370597.64579 RUNNER| #Hydra::Messages::Worker::Shutdown:0x4feeddc
1283370597.64553 WORKER| Sending Shutdown to Runner
1283370597.64673 WORKER| {:pid=>99845, :io=>#<Hydra::Pipe @reader=#IO:0x4ff9cf0, @writer=#IO:0x4ff9d2c>, :idle=>true}
1283370597.64784 RUNNER| Received message from worker
1283370597.64795 RUNNER| #Hydra::Messages::Worker::Shutdown:0x4fe7dd4
rake aborted!
No files, nothing to do
spec_helper_spec.rb is a simple spec that validates some helpers that get loaded by spec_helper.rb. Normally, it loads 'spec_helper.rb'. But even if I make spec/spec_helper_spec.rb a completely empty file, I get the error. rspec is in my bundle for the 'test' environment. I have tried a lot of different things, and I can't get past this problem. It appears Hydra itself is trying to load 'rspec' and can't find it.
I found a few google references to prior issues about this, but they don't seem to exist here anymore. Any suggestions?
Thanks,
Bill
Hi Bill,
as of version 0.21.0 Hydra only works with the rspec 2.0 beta. Please install Hydra 0.20.0.
Sorry for the inconvenience!
-Nick
That got me further. Thanks, Nick. And thanks for Hydra!