# Subdirectories in generator template directory

**URL:** <https://www.ruby-forum.com/t/subdirectories-in-generator-template-directory/127067>\
**Category:** Rails\
**Created:** [January 24, 2008, 6:09pm UTC](https://www.ruby-forum.com/t/subdirectories-in-generator-template-directory/127067 "2008-01-24T18:09:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/278dde/32.png) [@peter](https://www.ruby-forum.com/u/peter)\
**Post date:** [January 24, 2008, 6:09pm UTC](https://www.ruby-forum.com/t/subdirectories-in-generator-template-directory/127067/1 "2008-01-24T18:09:44Z")

</div>

Hi all,  
I’m trying to create a generator. As there are quite a few files in my  
generator i decided it would be a good idea to make some  
subdirectories in the template directory. But now i can’t seem to copy  
the files from these subdirectories with the file method. For example:  
record do |m|  
m.file File.join(‘controllers’,‘abc\_controller.rb’),  
File.join(‘app’,‘controllers’,‘abc\_controller.rb’)  
…  
gives a “No such file or directory …/templates/controllers/  
abc\_controller.rb”

Any ideas?  
Greetings,  
Peter
