1

gem list显示:

*** LOCAL GEMS ***

bundler (1.1.5)
coderay (1.0.8)
method_source (0.8.1)
pry (0.9.10)
slop (3.3.3)

然而,似乎如果我进入任何 Homebrew 文件,并执行以下操作:

require 'pry'

我得到:

Error: no such file to load -- pry
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/formula_installer.rb:2:in `require'
/usr/local/Library/Homebrew/formula_installer.rb:2
/usr/local/Library/Homebrew/cmd/install.rb:1:in `require'
/usr/local/Library/Homebrew/cmd/install.rb:1
/usr/local/bin/brew:51:in `require'
/usr/local/bin/brew:51:in `require?'
/usr/local/bin/brew:93

即使我尝试使用硬编码路径,我也会得到:

Error: no such file to load -- /Users/patrick/.rvm/gems/ruby-1.9.3-p194@global/bin/pry

即使它肯定存在...

patrick@vincent:/usr/local/Library/Homebrew(master)>ls -l /Users/patrick/.rvm/gems/ruby-1.9.3-p194@global/bin/pry
-rwxr-xr-x  1 patrick  staff  480 Oct 23 02:32 /Users/patrick/.rvm/gems/ruby-1.9.3-p194@global/bin/pry

我可以进去irbrequire 'pry',它工作得很好。这是怎么回事?

4

1 回答 1

0

啊哈..我需要'rubygems'

于 2012-10-23T09:49:38.460 回答