2012-12-12 2 views
0

rspec을 아무런 문제없이 설치했습니다. 그러나, rspec 명령을 실행하면 다음 오류가 발생합니다. 누구든지 도울 수 있니?64 비트 Win 7에서 rspec을 실행할 수 없습니다.

C:\>ruby -v 
ruby 1.9.3p327 (2012-11-10) [i386-mingw32] 

C:\>rspec 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.1/lib/rspec/core/configuration.rb:789:in `load': cannot load such file -- C:/spec (LoadError) 
     from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.1/lib/rspec/core/configuration.rb:789:in `block in load_spec_files' 
     from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.1/lib/rspec/core/configuration.rb:789:in `each' 
     from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.1/lib/rspec/core/configuration.rb:789:in `load_spec_files' 
     from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.1/lib/rspec/core/command_line.rb:22:in `run' 
     from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.1/lib/rspec/core/runner.rb:80:in `run' 
     from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.1/lib/rspec/core/runner.rb:17:in `block in autorun' 

C:\>gem list --local 

*** LOCAL GEMS *** 

actionmailer (3.2.9) 
actionpack (3.2.9) 
activemodel (3.2.9) 
activerecord (3.2.9) 
activeresource (3.2.9) 
activesupport (3.2.9) 
archive-tar-minitar (0.5.2) 
arel (3.0.2) 
awesome_print (1.1.0) 
bigdecimal (1.1.0) 
builder (3.0.4) 
bundler (1.2.2) 
coffee-rails (3.2.2) 
coffee-script (2.2.0) 
coffee-script-source (1.4.0) 
columnize (0.3.6) 
diff-lcs (1.1.3) 
domain_name (0.5.4) 
erubis (2.7.0) 
execjs (1.4.0) 
hike (1.2.1) 
i18n (0.6.1) 
io-console (0.3) 
journey (1.0.4) 
jquery-rails (2.1.3) 
json (1.7.5, 1.5.4) 
linecache19 (0.5.12) 
mail (2.4.4) 
mechanize (2.5.1) 
mechanize-progressbar (0.2.0) 
mime-types (1.19) 
minitest (2.5.1) 
multi_json (1.3.7) 
net-http-digest_auth (1.2.1) 
net-http-persistent (2.8) 
nokogiri (1.5.5 x86-mingw32) 
ntlm-http (0.1.1) 
ocra (1.3.0) 
pik (0.2.8) 
polyglot (0.3.3) 
progressbar (0.12.0) 
rack (1.4.1) 
rack-cache (1.2) 
rack-ssl (1.3.2) 
rack-test (0.6.2) 
rails (3.2.9) 
railties (3.2.9) 
rake (10.0.2, 0.9.2.2) 
rdiscount (1.6.8) 
rdoc (3.12, 3.9.4) 
rspec (2.12.0) 
rspec-core (2.12.1) 
rspec-expectations (2.12.0) 
rspec-mocks (2.12.0) 
ruby-debug-base19x (0.11.30.pre10, 0.11.30.pre3) 
ruby-debug-ide (0.4.17.beta14) 
ruby_core_source (0.1.5) 
sass (3.2.3) 
sass-rails (3.2.5) 
shoes (3.0.1) 
sprockets (2.2.1) 
sqlite3 (1.3.6 x86-mingw32) 
thor (0.16.0) 
tilt (1.3.3) 
tiny_tds (0.5.1 x86-mingw32) 
treetop (1.4.12) 
tzinfo (0.3.35) 
uglifier (1.3.0) 
unf (0.0.5) 
unf_ext (0.0.5 x86-mingw32) 
webrobots (0.0.13) 
wxruby-ruby19 (2.0.1 x86-mingw32) 

C:\> 

편집 : 다윗이 지적

, 나는 C에서 spec 폴더가 없습니다 : \. 그 폴더를 만든 후에는 모든 것이 잘된 것처럼 보입니다. 이 어리석은 질문에 대해 유감입니다. 나는 rspec에 완전히 새로운 사람이다. 다들 감사 해요!

C:\>mkdir spec 

C:\>rspec 
No examples found. 


Finished in 0 seconds 
0 examples, 0 failures 

C:\> 
+1

이름에 공백이있는 파일이나 경로가 있습니까? "c :/spec "? –

+0

아, c : \ 아래에'spec' 폴더가 없습니다. 하나를 만들면 모든 것이 잘된 것 같습니다. 내 편집을 참조하십시오. 데이빗 감사합니다! –

+1

왜 당신은 드라이브의 루트에 있습니까? – dcow

답변

2

rspec 명령은 드라이브의 루트에없는 임의의 프로젝트의 디렉토리 컨텍스트에서 실행 될 예정이다. 그것은 특정 spec 폴더를 찾을 수 없기 때문에 불평하고 있습니다. 근원에 1 개를 창조하는 것은 특유하게 조금보다는 더 많은 것처럼 보인다.

각 프로젝트에는 자체 spec 디렉토리가 있어야하고 rspec 명령은 해당 디렉토리의 상위 디렉토리에서 실행해야합니다.

관련 문제