From: "Jesús Gabriel y Galán" Date: 2010-08-05T15:40:33+09:00 Subject: Re: Ruby scrips getting executed in a loop. On Thu, Aug 5, 2010 at 8:28 AM, Parul Korea wrote: > While calling multiple ruby scripts into a single file, my scripts are > getting executed in a loop. Can someone please suggest me how to carry > out the execution of all the scripts just once? > For eg., I have abc.rb, xyz.rb being called out in a single file run.rb What do you mean by "called out"? Can you show the code? > While execution of run.rb, abc.rb and xyz.rb gets executed once and > after completion, again the execution of abc.rb starts and the loop > continues. One scenario I imagine is if you are using load to load the files: run.rb: load 'abc.rb' load 'xyz.rb' abc.rb: #something xyz.rb: load 'abc.rb' This will execute abc.rb twice. It can also happen if you are using require but with different paths to abc.rb, for example: run.rb: require 'lib/abc' lib/xyz.rb: require 'abc' I think we need more info to understand your problem. Jesus.