Forum: Ruby on Rails Errno::ENOENT (No such file or directory

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ruby R. (Guest)
on 2006-06-07 19:34
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:in `convertTo'
    /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:in
`process'
.....


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
Daniel B. (Guest)
on 2006-06-08 17:59
(Received via mailing list)
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
This topic is locked and can not be replied to.