Ruby require only works for me with gems not with code that I have written. I'm not sure what it is that I am doing wrong.
This works
require "test-unit"
require "require "C:\\Users\\zreichert\\workspace\\FalconQA\\PageObjects\\Users\\user.rb"
This doesn't work
require "Users/user"
require "Users\user"
require "Users/user.rb"
require "Users\user.rb"
require_relative "Users/user"
require_relative "Users\user"
require_relative "Users/user.rb"
require_relative "Users\user.rb"
The script that I am running is located in - C:/Users/zreichert/workspace/FalconQA/testCases
I have tried to change directories before require like this
Dir.chdir "C:/Users/zreichert/workspace/FalconQA/testCases"
All errors look something like this
c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- Users/user (LoadError)
from c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from C:/Users/zreichert/workspace/FalconQA/testCases/FAL001.rb:14:in `
require "./Users/user"
- user904990"Users\user"
will fail because of how escaped characters are interpreted in double-quoted strings. - the Tin Man