On Monday, April 18, 2016 at 11:32:07 AM UTC-4, Colin Law wrote:
>
> On 18 April 2016 at 15:50, fugee ohu <[email protected] <javascript:>> 
> wrote: 
> >   def move_file 
> >     from_path=params[:file_name] 
> >     to_path=params[:file_name] 
> >     to_path["queue/"]="" 
>
> Have you put a debug print in to check what from_path and to_path are set 
> to? 
>
> Colin 
>
> >     FileUtils.mv "#{from_path}", "#{to_path}" 
> >     redirect_to request.referrer 
> >   end 
> > 
> > request parameters: 
> > 
> > {"file_name"=>"recordings/WCR-20160409.mp3", 
> >  "file_type"=>"to_be_moved", 
> >  "page"=>"list_directory"} 
> > 
> > i get this error: 
> > 
> > Errno::ENOENT in RecordingsController#move_file 
> > 
> > No such file or directory @ sys_fail2 - (recordings/WCR-20160409.mp3, 
> > recordings/WCR-20160409.mp3) 
> > 
> > around ... FileUtils.mv "#{from_path}", "#{to_path}" 
>
> > 
> > 
> > I'm trying to move the file from the recordings/queue/ direcotry up a 
> level 
> > to recordings/ I don't really understand the error it looks like it's 
> taking 
> > both arguments, from_path and to_path and treating them as a combined 
> first 
> > argument Anyone? 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Ruby on Rails: Talk" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/rubyonrails-talk/efc084af-3b60-4ebe-9b0d-cdad52b595b7%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>


No because this action doesn't print, it moves the file and redirects 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/d3dc7d98-1d9b-4e9e-b1f2-1f4c4341d6a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to