如何在切换到捆绑器后将宝石错误消除

编程入门 行业动态 更新时间:2024-10-24 06:29:08
本文介绍了如何在切换到捆绑器后将宝石错误消除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我最近转而使用bundler,现在随时在rails应用程序的脚本/文件夹下运行脚本,我收到以下警告:

I recently switched to using bundler and now anytime I run a script under the scripts/ folder in my rails app I get the following warning:

config.gem: Unpacked gem environment.rb in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. config.gem: Unpacked gem environment.rb in vendor/gems not in a versioned directory. Giving up. config.gem: Unpacked gem ruby in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. config.gem: Unpacked gem ruby in vendor/gems not in a versioned directory. Giving up.

我必须做些什么来消除这些错误或解决这些错误?

What do I have to do to silence these errors or resolve them?

推荐答案

今天我有同样的问题。转到config / environment.rb并在配置块中添加以下行。

I had this same problem today. Go to config/environment.rb and add the following line within the config block.

Rails::VendorGemSourceIndex.silence_spec_warnings = true

更多推荐

如何在切换到捆绑器后将宝石错误消除

本文发布于:2023-11-11 23:38:42,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:后将   切换到   错误   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!