gpt4 book ai didi

ruby-on-rails - 切换到 bundler 后如何消除 gem 错误

转载 作者:行者123 更新时间:2023-12-04 06:59:11 25 4
gpt4 key购买 nike

我最近切换到使用 bundler,现在每当我在 Rails 应用程序的 scripts/文件夹下运行脚本时,我都会收到以下警告:

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.

我该怎么做才能消除这些错误或解决它们?

最佳答案

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

Rails::VendorGemSourceIndex.silence_spec_warnings = true

关于ruby-on-rails - 切换到 bundler 后如何消除 gem 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2144659/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com