Back

copy all files from gem folder to rails folder

发布时间: 2014-07-20 02:22:00

$ cd <gem_folder>

$ cp -r app config lib <rails_folder>

不过这个方法不够好,因为 script 目录下的文件容易被覆盖 ( local.yml, routes.rb 等) ,最好的办法还是让这个 gem 单独写个rake 任务,(例如: rake your_gem:override )  ( the best solution is use the gem's method : override if there is ) 

一般来说, copy app 目录就可以了。 例如: config/routes, config/local 目录一般不用COPY,因为看controller,   view是最重要的。

Back