Errno::ENOENT (No such file or directory


#1

Hi,
I have my RoR deployed on Linux server. My application has “browse file”
section where it selects the file from users machine (e.g. -
D:/kw/loaddata/New/abc.txt) and passes it to convertTo method

But the path is not being resolved. It throws me an error:
Errno::ENOENT (No such file or directory - D:/kw/loaddata/New/abc.txt):
.//app/controllers/releases_controller.rb:35:in initialize' .//app/controllers/releases_controller.rb:35:inconvertTo’
/scratch/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in
perform_action_without_filters' /scratch/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:inprocess’

any input on how do I reolve this? I’m chaging the windows to fwd slash
in my method. I guess I can access file on windows from linux box.

def convertTo
inputfilename = params[:inputfilename].gsub("\","/")
end


#2

Ruby R. wrote:

`perform_action_without_filters’
end

Perhaps it’s choking on the leading “D:”.

Does this simple test work, using irb?
File.exists?(“D:/kw/loaddata/New/abc.txt”)

Dan