From: MAwiniarski on
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
From: Stefano Crocco on
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


From: MAwiniarski on
On Jul 7, 8:32 pm, Stefano Crocco <stefano.cro...(a)alice.it> wrote:
> On Monday 07 July 2008, MAwiniarski wrote:
>
I've solve it.

It needs different parameter than 'r+'

>
>
> > 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