initialize : permission denied

B

Bob Miner

Hi,
Tryin to create a file that I'll write in. The error I get is:
initialize : permission denied
I've tried all of the following
File.new("a151noplus.txt","w")
g=File.new("a151noplus.txt","w")
File.new('a151noplus.txt','w')
g=File.new('a151noplus.txt','w')

Single quotes, double quotes, hit enter while swinging a dead chicken
over my head and chanting.....no luck.
 
T

Tim Hunter

Bob said:
Hi,
Tryin to create a file that I'll write in. The error I get is:
initialize : permission denied
I've tried all of the following
File.new("a151noplus.txt","w")
g=File.new("a151noplus.txt","w")
File.new('a151noplus.txt','w')
g=File.new('a151noplus.txt','w')

Single quotes, double quotes, hit enter while swinging a dead chicken
over my head and chanting.....no luck.

Typically "permission denied" means you don't have write-access to the
directory or file. Nothing to do with quoting.
 
B

Bob Miner

Never mind....I got it.

I needed to specify a directory, and use "/" forward slashes.
 
S

Sebastian Hungerecker

Bob said:
Tryin to create a file that I'll write in. =C2=A0The error I get is:
initialize : permission denied

I know this is a crazy idea, but would it by any chance be possible that yo=
u=20
don't have permission to write to the file?
On Windows that could be the result of the file already being opened. Or ju=
st=20
by you not having the required permissions on the file.

HTH,
Sebastian
=2D-=20
Jabber: (e-mail address removed)
ICQ: 205544826
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top