本文介绍了如何在切换到捆绑器后将宝石错误消除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近转而使用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
这篇关于如何在切换到捆绑器后将宝石错误消除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!