in 'require': no such file to load — spec_helper

前端 未结 5 1162
醉话见心
醉话见心 2020-12-29 03:04

Came across this error when trying out the ruby on rails tutorial section with rspec on a windows platform using jruby 1.6:

c:\\rails_projects\\sample_app>         


        
5条回答
  •  暖寄归人
    2020-12-29 03:29

    I had the same problem but for a different reason:

    in my spork.prefork block within my spec_helper.rb file I had this line

    Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
    

    but within one of the files that was being required above (spec/support/some_helper_file.rb) was a require 'spec_helper' call

    removing this unneeded require solved the issue

提交回复
热议问题