Search code examples
ruby-on-railsrubyrake

Rails, Rake, moving a folder to a new location


I need to move a folder from a plugin to the main app/views. I guess using rake to do this with the following command is the easiest way:

 require 'fileutils'
 FileUtils.mv('/vendor/plugins/easy_addresses/lib/app/views', '/app/views/')

I'm just not sure where to tell script where to look and where to place the folder.

The file I want to move is in the following location: `vender/plugins/easy_addresses/lib/app/views/easy_addresses

easy_ addresses is the name of the folder in views that I want to move to my_app/app/views/


Solution

  • FileUtils.mv('/source/', '/destination/')