From: Joel Pearson Date: 2012-10-29T23:26:12+09:00 Subject: Re: Running a Ruby script through a shortcut on a different drive. Jeremy Bopp wrote in post #1081812: > In the properties for your shortcut, set the "Start in" path to wherever > you want your logs to be located. Otherwise, you need to modify your > script to write its log files to an explicit path rather than rely on > the current working directory. > > -Jeremy Thanks Jeremy! I'd forgotten about that option. Because my program also runs on some computers as an exe made by Ocra (another complication), I've added a bit of code at the start that uses File.dirname(__FILE__) if Dir.pwd evaluates as the root. It's not perfect but no one should be running this from a root drive anyway. I'll change the shortcut as well. -- Posted via http://www.ruby-forum.com/.