...문제 명령을 내 testfile 위의 test_a에 쓰기 단순히 그러나 나는 또 다시이 이상한 메시지를 받고 오전 testfile 위와 같은 폴더에 존재하는 파일을 필요로하고
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- a.rb (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from C:/dummyFirefox/test_a.rb:1:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `block in load_spec_files'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `map'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `load_spec_files'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/command_line.rb:18:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:55:in `run_in_process'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:46:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:10:in `block in autorun'
코드를 필요로 사용 .rb는 단순히 :
require 'a.rb'
을 내가 명령을 실행할 때 : rspec test_a.rb
를 메시지는 위에서 언급 한 오류입니다.
개발을 위해 ruby-1.9.2를 사용하고 있습니다.
희망 사항 세부 사항을 놓치지 마세요. 미리 감사드립니다.
가능한 중복 ] (http://stackoverflow.com/questions/4491049/calling-another-ruby-file-that-is-not-a-gem) – Nakilon
참고 : http://stackoverflow.com/questions/2900370/why- do-ruby-1-9-2-load-path-and-whats-the-alternative에서 제거하십시오. – Nakilon