2010-04-14 2 views
0

레일 앱을 일시 중지 한 후 테스트를 다시 시작했습니다. 내 레일 앱에서 테스트를 실행하면 SystemStackError가 반환됩니다. 데프 Fixnum이라는 assert_instance_of레일 테스트 시스템 스택 오류

을 test_per_page

같은 심지어 간단한 테스트, Activity.per_page

것은 나에게

C를주고있다 : /Ruby/lib/ruby/gems/1.8/ gems/activesupport-2.3.2/lib/active_support/core_ext/m odule/introspection.rb : 74 :`local_constants ': 스택 레벨이 너무 깊음 (SystemStac kError)

from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/module/introspection.rb:73:in `select' 
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/module/introspection.rb:73:in `local_constants' 
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/module/introspection.rb:86:in `local_constant_names' 
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:531:in `new_constants_in' 
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:525:in `collect' 
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:525:in `new_constants_in' 
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require' 
from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin/locator.rb:89:in `plugins' 
    ... 12095 levels... 
from ./unit/../test_helper.rb:2 
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
from unit/my_test.rb:1 

테스트 유닛 젬을 설치하고 제거한 것을 발견했습니다. 그 후에도 동일한 문제가 계속 발생합니다. 나는 rcov를 설치 한 상태에서 rcov도 사용하고있다.

C : /Ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb : 666 :`hash ': 스택 레벨 너무 깊다 (SystemStackError)

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `inject' 
    from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb:664:in `each' 
    from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb:664:in `inject' 
    from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/specification.rb:664:in `hash' 
    from C:/Ruby/lib/ruby/1.8/tsort.rb:219:in `[]=' 
    from C:/Ruby/lib/ruby/1.8/tsort.rb:219:in `each_strongly_connected_component_from' 
    from C:/Ruby/lib/ruby/1.8/tsort.rb:219:in `each' 
    from C:/Ruby/lib/ruby/1.8/tsort.rb:219:in `each_strongly_connected_component_from' 
    ... 12099 levels... 
    from C:/Ruby/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0-x86-mswin32/bin/rcov:554:in `load' 
    from C:/Ruby/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0-x86-mswin32/bin/rcov:554 
    from C:/Ruby/bin/rcov:19:in `load' 
    from C:/Ruby/bin/rcov:19 

는 누구도 내가 보석이 불렀다 점점 필요해서 또 다시 ..이 주위에 방법이 있다는 것을 이해 .. 전에 이런 일에 실행 했습니까?

+0

그래서 문제가 내가 설치 한 플러그인 중 하나를 추측하고 ... 나는 새 프로젝트를 생성하고 동일한 시스템에 간단한 단위 테스트를 작성 시도하고 그것이 마치 마법처럼 일했다. . /Ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/gem_dependency.rb : 99 또한 매번 내가 ..이 경고는 먼저 테스트를 실행 C를 시작합니다 : 경고 : Gem :: Dependency # version_requirements는 더 이상 사용되지 않으며 2010 년 8 월 이후에 삭제 될 예정입니다. #requirement 사용 gem update --system을 사용하여 보석을 업데이트했지만 여전히 sa를 제공합니다. 내 오류 .. 미리 도움 주셔서 감사합니다 ... –

답변

0

Ooops! 환경이 시작될 때 rcov에 대해 두 개의 초기화 프로그램을 실행했습니다. 하나는 environment.rb 파일에 있고 다른 하나는 config 폴더의 env 하위 폴더에있는 별도의 test.rb 파일에 있습니다. 그래서 끊임없이 반복되는 작업을 반복했습니다. 어쨌든 문제는 해결되었고 지구는 여전히 회전하고 있습니다.

감사