如何找到安装Ruby Gem的路径

How to find the path of where a Ruby Gem is installed

我刚刚在我的 MAC 中安装了 Cucumber 和 bundler,我收到了这个错误消息:

Error creating formatter: Teamcity::Cucumber::Formatter (ArgumentError)

gem 'cucumber', version
load Gem.bin_path('cucumber', 'cucumber', version)

根据此 ticket,尚不支持 cucumber >= 2.1.0。您可以降级、等待更新或使用他们建议的猴子补丁:

find in RubyMine folder file named "formatter_03103.rb" and replace line 22 to

 def initialize(step_mother, path_or_io, options) 

and line 24 to

tc_initialize(options, '|', path_or_io)

还有命令 gem environment returns 很多关于你的宝石的信息,包括 INSTALLATION DIRECTORY