File.open initialization error

Greetings,

I want to create new file using:

f = File.new('filename', 'r+')

I've got following output:

file.rb:lineNo:in 'initialize'
file.rb:lineNo:in 'open'

Looks like File.new (before using open method) couldn't initialize.

Totally don't know what to do with it. I've got ruby installed
properly, and everything
works fine apart from File class 8-*

THX for help

Could you please post the whole error message?

Stefano

···

On Monday 07 July 2008, MAwiniarski wrote:

Greetings,

I want to create new file using:

f = File.new('filename', 'r+')

I've got following output:

file.rb:lineNo:in 'initialize'
file.rb:lineNo:in 'open'

Looks like File.new (before using open method) couldn't initialize.

Totally don't know what to do with it. I've got ruby installed
properly, and everything
works fine apart from File class 8-*

THX for help

I've solve it.

It needs different parameter than 'r+'

···

On Jul 7, 8:32 pm, Stefano Crocco <stefano.cro...@alice.it> wrote:

On Monday 07 July 2008, MAwiniarski wrote:

> Greetings,

> I want to create new file using:

> f = File.new('filename', 'r+')

> I've got following output:

> file.rb:lineNo:in 'initialize'
> file.rb:lineNo:in 'open'

> Looks like File.new (before using open method) couldn't initialize.

> Totally don't know what to do with it. I've got ruby installed
> properly, and everything
> works fine apart from File class 8-*

> THX for help

Could you please post the whole error message?

Stefano