Rails 3: Errno::ENOENT exception

241 Views Asked by At

I have the code as following. It runs OK on my local machine

`params[:file].each do |f|
    tmp = f.tempfile
    ext = File.extname(f.original_filename)

    basic_file_name = "#{session[:user]["id"]}_#{Time.new.to_i}#{ext}".downcase

    file = File.join(TEMPORARY_FILE_FOLDER, basic_file_name)
    FileUtils.cp tmp.path, file`

But on my remote server which is a CentOS server, it gives me this

`Errno::ENOENT in CustomController#process_custom_order

No such file or directory - public/uploaded/709_1388758536.jpg`

Thanks, guys!

0

There are 0 best solutions below