File class doesn't work!

D

Daniel Carrera

Something is severely broken with my installation:

$ ls *.xml
context.xml
$ ruby -e 'puts File.exists?("content.xml")'
false
$


I just moved my ~/lib/ruby diectory some place else and re-installed Ruby
from scratch again. I still get the same problem.

Can anyone fanthom why something as basic as the File class could fail to
work on a fresh installation?

I am completely at a loss here. And naturally I can't use Ruby at all
because some of the basic funtionality I need (File and REXML) don't work.

Best,
Daniel.
 
H

Hal Fulton

Daniel said:
Something is severely broken with my installation:

$ ls *.xml
context.xml
$ ruby -e 'puts File.exists?("content.xml")'
false
$

Isn't it "exist?" rather than "exists?"?

Hal
 
M

Mike Stok

Something is severely broken with my installation:

$ ls *.xml
context.xml
conte>>>x<<<t.xml

$ ruby -e 'puts File.exists?("content.xml")'
conte>>>n<<<t.xml

false
$

maybe?

Hope this helps,

Mike
 
G

gabriele renzi

il Tue, 28 Oct 2003 07:37:20 +0900, Daniel Carrera
Something is severely broken with my installation:

$ ls *.xml
context.xml
$ ruby -e 'puts File.exists?("content.xml")'
false
$

context != content :)
 
D

Daniel Carrera

Isn't it "exist?" rather than "exists?"?

They both exist =)
And they both give the same result.

$ ruby -e 'puts File.methods' | grep 'exist'
exist?
exists?
$ ruby -e 'puts File.exists?("content.xml")'
false
$ ruby -e 'puts File.exist?("content.xml")'
false
$ ls context.xml
context.xml


=(
 
H

Hal Fulton

Daniel said:
They both exist =)
And they both give the same result.

$ ruby -e 'puts File.methods' | grep 'exist'
exist?
exists?
$ ruby -e 'puts File.exists?("content.xml")'
false
$ ruby -e 'puts File.exist?("content.xml")'
false
$ ls context.xml
context.xml

Ahhh.

'context' != 'content'

Hal
 
D

Daniel Carrera

Ahhh.

'context' != 'content'


Okay, I am oficially dyslexic. This isn't the first time I confuse two
symilar-sounding English words.

Thank you for your patience. Yes, "context.xml" does exist.

Cheers,
 

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
474,139
Messages
2,570,805
Members
47,351
Latest member
LolaD32479

Latest Threads

Top