Trying to create a folder dir in rails

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…


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


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

Dir.mkdir “#{RAILS_ROOT}/public/midifiles/#{}”


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs