[英]need to build gemspec and install gem everytime in make a change in gem file
I am creating a custom gem from scratch, and every time i make a change in the gem file, and restart the console, the change is not effective. 我正在从头开始创建自定义gem,并且每次我在gem文件中进行更改并重新启动控制台时,该更改均无效。
I need to build the gemspec and install the gem every time for my changes to be effective, is there any other approach to it that could save some of the time, Thanks. 为了使更改生效,我需要构建gemspec并每次都安装gem,是否有其他方法可以节省一些时间,谢谢。
Yes, it is possible to test your gem functionality without build and install it every time. 是的,无需构建和安装它就可以测试您的gem功能。 Just specify path
option in your application Gemfile
(not in your gem): 只需在应用程序Gemfile
指定path
选项(而不是在gem中):
gem 'your gem name', path: 'path to your gem directory'
After that you can just restart application to reload changes in your gem. 之后,您可以重新启动应用程序以重新加载您的gem中的更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.