2012-10-23 70 views
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) 

然而,似乎如果我去到任何自制軟件的文件,然後執行:

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/[email protected]/bin/pry 

即使它肯定是有...

[email protected]:/usr/local/Library/Homebrew(master)>ls -l /Users/patrick/.rvm/gems/[email protected]/bin/pry 
-rwxr-xr-x 1 patrick staff 480 Oct 23 02:32 /Users/patrick/.rvm/gems/[email protected]/bin/pry 

我可以進入irbrequire 'pry'和它工作得很好。這是怎麼回事?

+0

我還沒有得到到這條底線,但我認爲這是因爲家釀[部隊使用系統紅寶石(https://開頭github上。 com/Homebrew/homebrew/blob/f244281d4bae70296fb3bd5949bf03a36833a2ce/bin/brew#L36-L44)而不是你的'rvm'/['rbenv'](https://github.com/rbenv/rbenv)/其他Ruby。因此找不到'〜/ .rvm/gems /'中的寶石。 – duozmo

回答

0

啊哈。我需要需要「RubyGems的」