Hi,

Thanks very much for the replies.

I tried to install the posixlock gem, but got the following error
message:

C:/Ruby187/bin/ruby.exe extconf.rb
creating Makefile

make
gcc -I. -I/C/Ruby187/lib/ruby/1.8/i386-mingw32
-I/C/Ruby187/lib/ruby/1.8/i386-mingw32 -I.   -g -O2 -DFD_SETSIZE=256
-c posixlock.c
posixlock.c:2:26: missing/file.h: No such file or directory
posixlock.c: In function `posixlock':
posixlock.c:82: error: storage size of 'lock' isn't known
posixlock.c:87: error: `F_RDLCK' undeclared (first use in this function)
posixlock.c:87: error: (Each undeclared identifier is reported only once
posixlock.c:87: error: for each function it appears in.)
posixlock.c:90: error: `F_WRLCK' undeclared (first use in this function)
posixlock.c:93: error: `F_UNLCK' undeclared (first use in this function)
posixlock.c:101: error: `F_SETLK' undeclared (first use in this
function)
posixlock.c:101: error: `F_SETLKW' undeclared (first use in this
function)
posixlock.c: In function `rb_file_lockf':
posixlock.c:160: error: storage size of 'lock' isn't known
posixlock.c:183: error: `F_WRLCK' undeclared (first use in this
function)
posixlock.c:184: error: `F_SETLKW' undeclared (first use in this
function)
posixlock.c:187: error: `F_RDLCK' undeclared (first use in this
function)
posixlock.c:192: error: `F_SETLK' undeclared (first use in this
function)
posixlock.c:199: error: `F_UNLCK' undeclared (first use in this
function)
posixlock.c:205: error: `F_GETLK' undeclared (first use in this
function)
make.exe: *** [posixlock.o] Error 1

I spent ages googling for a solution, but came up empty handed.

I then tried implementing Phillip's suggestion and that achieved exactly
what I had hoped.

Thanks again.

-- 
Posted via http://www.ruby-forum.com/.