`require': cannot load such file - Ruby + Rspec -
im having trouble loading dependences in ruby app (non-rails).
its folder tree
project
-> bin -> lib -> modules -> file1.rb -> file2.rb -> spec -> file2_spec.rb
my file is
require 'file1' module file2 end
my spec is
require 'spec_helper' require_relative '../lib/modules/file2'
in error message shows
rspec spec/query_util_spec.rb /home/gustavo/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- file1 (loaderror)
i tried add "require_relative" file1 in spec , still not work.
i'll grateful give me directions
change file2.rb
this:
require './file1' module file2 end
Comments
Post a Comment