[rspec-devel] [ rspec-Bugs-12698 ] ::Dispatcher.reset_application! causes exception

noreply at rubyforge.org noreply at rubyforge.org
Sun Oct 21 14:47:16 EDT 2007


Bugs item #12698, was opened at 2007-07-30 13:04
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=12698&group_id=797

Category: Autotest
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Brian Takita (btakita)
Assigned to: Nobody (None)
Summary: ::Dispatcher.reset_application! causes exception

Initial Comment:
Here is the backtrace. This happens in spec_server.rb

(druby://localhost:8989) /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:93:in `clear_reloadable_connections!': undefined method `requires_reloading?' for {}:Hash (NoMethodError)
	from (druby://localhost:8989) /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:92:in `each'
	from (druby://localhost:8989) /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:92:in `clear_reloadable_connections!'
	from (druby://localhost:8989) /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:65:in `reset_application!'
	from (druby://localhost:8989) ./script/spec_server:21:in `run'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.5/lib/spec/runner/drb_command_line.rb:13:in `run'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.5/lib/spec/runner/option_parser.rb:188:in `parse_drb'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.5/lib/spec/runner/option_parser.rb:147:in `parse'
	from /usr/local/lib/ruby/1.8/optparse.rb:1260:in `call'
	 ... 8 levels...
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.5/lib/spec/runner/command_line.rb:14:in `run'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.5/bin/spec:3
	from /usr/local/bin/spec:16:in `load'
	from /usr/local/bin/spec:16


----------------------------------------------------------------------

Comment By: Brian Takita (btakita)
Date: 2007-07-30 13:05

Message:
Here is my redefined run method that fixes this issue:

module Spec
  module Runner
    class RailsSpecServer
      def run(args, stderr, stdout)
        $stdout = stdout
        $stderr = stderr

        Dependencies.mechanism = :load
        Dependencies.clear
        
        ::Spec::Runner::CommandLine.run(args, stderr,
stdout, false, true)
      end
    end
  end
end


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=12698&group_id=797


More information about the rspec-devel mailing list