我尝试在我的 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
奇怪的是 taps 仍然出现在我的 gem 列表中。这个错误是什么意思?它会阻止我使用 Heroku 的 db:push 命令吗?
答案1
gem which
找到图书馆gems 中的文件。没有taps.rb
in /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
那么,您将使用什么命令来验证 taps (或 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