You''re receiving that error because of the leading / before public -
it''s treating it like an absolute path instead of a relative one. Try
this:
Dir.mkdir "#{RAILS_ROOT}/public/midifiles/#{current_user.id}"
-Dan
http://www.dcmanges.com
On Sep 7, 7:08 pm, GabrielG1976
<GabrielG1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello IM trying to create a folder directory based on when the user
> signs up and is created Im using restful Authencation and the code i
> added to the create methos is this...
>
> Dir.mkdir"/public/midifiles/#{current_user.id}"
>
> The public and the midi folder are allready made I just want it to
> create the current_user a folder .
>
> the Error i get is this...
>
> No such file or directory - /public/midifiles/3
>
> Thanks any help would be great
>
> Gabriel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---