[英]How to get location of gem using bundler or Rails from within Ruby?
[英]How to disable gem temporarily in Rails 3 using Bundler?
我发现redgreen gem与测试文件的ISO-8859-1编码不兼容。 暂时禁用一个gem来运行某些测试文件的最佳方法是什么?
我的第一个建议是将这些文件保存为UTF-8。
或者,我将研究Bundler的分组功能 。
在你的Gemfile
group :utf8 do
gem 'redgreen'
end
然后只在你想使用redgreen
gem时才require
该组。
Bundler.require(:utf8, :default, Rails.env)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.