切换到捆绑器后如何消除gem错误

时间:2010-01-27 04:52:37

标签: ruby-on-rails gem

我最近切换到使用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.

我需要做些什么来消除这些错误或解决它们?

1 个答案:

答案 0 :(得分:3)

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

Rails::VendorGemSourceIndex.silence_spec_warnings = true