简体   繁体   English

我已经安装了一个gem - 但是在/ lib中找不到它

[英]I've installed a gem - but can't find it in /lib

I've installed a ruby gem using the command line. 我使用命令行安装了ruby gem。 When I try gem list --local it clearly shows that the gem is clearly installed on my machine. 当我尝试gem list --local它清楚地表明我的机器上已经清楚地安装了gem。

However I want to make changes according to the documentation. 但是我想根据文档进行更改。 According to the documentation (using gem server and then http://localhost:8808/ ), I should look for the gem under /lib . 根据文档(使用gem server然后http://localhost:8808/ ),我应该在/lib下查找gem。

However I cannot find it anywhere on my machine - I looked using my mac's finder so that I can then edit it using textmate, but nada. 但是我无法在我的机器上找到它 - 我用我的mac查找器查看,然后我可以使用textmate编辑它,但是nada。

Any ideas? 有任何想法吗? Where should I look for the gem so I can edit/use it? 我应该在哪里寻找宝石,以便我可以编辑/使用它? Thanks! 谢谢!

You need to use the -d flag to get detailed information. 您需要使用-d标志来获取详细信息。

gem list --local -d

For uglifier , for example 例如,对于uglifier

uglifier (1.3.0)
Author: Ville Lautanala
Homepage: http://github.com/lautis/uglifier
Installed at: /Users/deefour/.rbenv/versions/1.9.3-p327/gemsets/myapp

Ruby wrapper for UglifyJS JavaScript compressor

To find the location of a gem: 要找到宝石的位置:

gem which <gemname>

For example with the debugger gem 例如,使用debugger gem

gem which debugger

/opt/ruby/ruby-1.9.3-p392/lib/ruby/gems/1.9.1/gems/debugger-1.5.0/lib/debugger.rb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM