Hard to say. If you're kicking off things with a Ruby script and that script's above the stuff that you want to load, you may want to start off with putting it there
From: Ajay Reddy <sithagariajayre...@gmail.com> To: Watir General <watir-general@googlegroups.com> Cc: jfitis...@yahoo.com Sent: Monday, July 11, 2016 8:44 AM Subject: Re: [wtr-general] cannot load such file — Config/Data/data_form.yml (LoadError) Thanks Johnssn, But where do you want me to add "root = File.expand_path(File.dirname(__FILE__))" and this too "$LOAD_PATH.unshift(root)". On Monday, July 11, 2016 at 10:27:53 AM UTC-5, johnssn wrote: Ruby has a $LOAD_PATH constant that tells it where to look for things. I usually do something like this to add something for the 'root' directory where I have some files that I need to access: root = File.expand_path(File.dirname( __FILE__))$LOAD_PATH.unshift(root) And then you should be able to require things relative to whatever 'root' is. From: Ajay Reddy <sithagari...@gmail.com> To: Watir General <watir-...@googlegroups. com> Sent: Monday, July 11, 2016 8:13 AM Subject: [wtr-general] cannot load such file — Config/Data/data_form.yml (LoadError) require "./TestData" require 'yaml' class CardSubmission < Application include PageObject include DataMagic include TestData def initialize(browser) @browser = browser end def submit_application(data = {}) DataMagic.load ("data_form.yml") populate_page_with data_for(:Auto_Data, data) end end I am calling DataMagic.yml_directory = 'Config/data/data_form.yml' in env.rb -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com http://groups.google.com/ group/watir-general watir-genera...@ googlegroups.com --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-genera...@ googlegroups.com. For more options, visit https://groups.google.com/d/ optout. -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.