Hi!
On the road with Gems installation. I set my mind to actually fix the
things in the local installation that's not working. Right now it seems
to install rake without problem, but the RDoc on the other hand. Well,
we're back at NormalizedFile and CWD. AGAIN. At a certain point in RDoc
installation we have this:
(With my puts added.)
def check_files
@files.each do |f|
stat = File.stat f rescue error("File not found: #{f}")
puts "trying this in: #{Dir.getwd}"
puts "try to stat: #{stat.inspect}"
error("File '#{f}' not readable") unless stat.readable?
end
end
This method actually works for the few first files, for the simple
reason that the first names to stat is 'lib' and 'README' (This also
show another implementation error. File#stat should throw an error when
the file to stat doesn't exist, but this one doesn't blow up until
stat.readable? on the file named 'MIT-LICENSE'. So, I added a small
method like this in NormalizedFile:
public boolean canRead() {
System.err.println("asked if file: " + getAbsolutePath() + " can
be read");
return super.canRead();
}
and got this output:
Attempting local installation of 'rake-0.7.1.gem'
Successfully installed rake, version 0.7.1
Installing RDoc documentation for rake-0.7.1...
trying this in: D:/Project/jruby/lib/ruby/gems/1.8/gems/rake-0.7.1
try to stat: #<File::Stat:0x5e8af1>
asked if file: D:/Project/jruby/lib can be read
trying this in: D:/Project/jruby/lib/ruby/gems/1.8/gems/rake-0.7.1
try to stat: #<File::Stat:0x1518c4d>
asked if file: D:/Project/jruby/README can be read
trying this in: D:/Project/jruby/lib/ruby/gems/1.8/gems/rake-0.7.1
try to stat: #<File::Stat:0x13b961>
asked if file: D:/Project/jruby/MIT-LICENSE can be read
File 'MIT-LICENSE' not readable
As you can see, the NormalizedFile still checks the _real_ java cwd,
which isn't the same as Ruby cwd. How should we resolve this issue? It
seems a complete rewrite of all places with dependencies on cwd is in
order, or what do you say, Charlie and Tom?
/Ola
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel