Ruby

使用 RVM 安裝 Heroku Taps gem 時遇到問題

  • August 29, 2011

我嘗試在我的 rvm 上安裝 taps gem,但得到以下結果:

larson:~ larson$ rvm gem install taps
Successfully installed taps-0.3.23
1 gem installed
Installing ri documentation for taps-0.3.23...
Installing RDoc documentation for taps-0.3.23...
larson:~ larson$ ruby -S gem which taps
ERROR:  Can't find ruby library file or shared library taps

奇怪的是,水龍頭仍然出現在我的寶石列表中。這個錯誤是什麼意思,它會阻止我使用 Heroku 的 db:push 命令嗎?

gem which在 gems 中找到**庫文件的位置。**沒有taps.rbin /usr/local/lib/ruby/gems/1.8/gems/taps-0.3.23/lib/,因此您收到了上述消息:

# ls -l /usr/local/lib/ruby/gems/1.8/gems/taps-0.3.23/lib/
total 8
drwxr-xr-x 2 root root 4096 Aug 27 10:31 taps
drwxr-xr-x 2 root root 4096 Aug 27 10:31 vendor

木偶的另一個例子:

# ls -l /usr/local/lib/ruby/gems/1.8/gems/puppet-2.7.1/lib/
total 8
drwxr-xr-x 30 root root 4096 Jul 18 16:41 puppet
-rw-rw-r--  1 root root 3781 Jul 18 16:41 puppet.rb

# gem which puppet
/usr/local/lib/ruby/gems/1.8/gems/puppet-2.7.1/lib/puppet

那麼您將使用什麼命令來驗證水龍頭(或木偶)gem 是否存在並且正在工作?

gem list taps

*** LOCAL GEMS ***

taps (0.3.23)

和:

taps -h
Options
=======
server    Start a taps database import/export server
pull      Pull a database from a taps server
push      Push a database to a taps server
version   Taps version

Add '-h' to any command to see their usage

引用自:https://serverfault.com/questions/305462