How to silence gem errors after switching to bundler

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 03:25:31

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/2144659/how-to-silence-gem-errors-after-switching-to-bundler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!