简体   繁体   English

修改rails new命令

[英]Modify rails new command

When executing the rails new ... command, eventually the task bundle install will be executed. 当执行rails new ...命令时,最终将执行任务bundle install For many of my projects I require the same gems and have to add them manually after creating the app and then run bundle install again manually. 对于我的许多项目,我都需要相同的gem,并且创建应用程序必须手动添加它们,然后再次手动运行bundle install

Is there any way to modify the rails new command to write those gems inside the Gemfile while generating the app, so that when it executes bundle install all my gems are already in place? 有什么方法可以修改rails new命令,以便生成应用程序时将这些gems写入Gemfile中,以便在执行捆绑安装时,我所有的gems都已安装到位? Ideally only triggered if I give an optional parameter? 理想情况下,仅当我提供可选参数时才触发?

尝试使用应用程序模板

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM