require lib in RSpec with Ruby 1.9.2 brings “no such file to load”
问题 I am trying to upgrade one of my Rails projects to Ruby 1.9.2 . All went pretty well, but one RSpec test broke. In this test I require a Ruby lib : # file spec/models/my_lib_spec.rb require 'spec_helper' require 'lib/services/my_lib' describe "MyLib" do it "should do something" do ... The lib looks like this: # file lib/services/my_lib.rb class MyLib def self.do_something ... In Ruby 1.8.7 (REE) the test worked well: $ ruby -v ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin11.1.0], MBARI