0

我搜索了类似的问题,但仍然无法解决这个问题。我安装了我的 jiveapps gem,但是找不到它。

Successfully installed jiveapps-1.0.7
1 gem installed
Installing ri documentation for jiveapps-1.0.7...
Installing RDoc documentation for jiveapps-1.0.7...
new-host-2:sites jeffreyerickatz$ gem list jiveapps

*** LOCAL GEMS ***

以下也不起作用:

new-host-2:sites jeffreyerickatz$ gem which jiveapps
ERROR:  Can't find ruby library file or shared library jiveapps
new-host-2:sites jeffreyerickatz$ rake gemspec
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

(See full trace by running task with --trace)

你可以看到我只安装了一个版本的 ruby

ew-host-2:sites jeffreyerickatz$ rvm list

rvm rubies

=* ruby-1.9.3-p194 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

这是我的宝石路径

 - GEM PATHS:
 - /Users/jeffreyerickatz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1
 - /Users/jeffreyerickatz/.gem/ruby/1.9.1

当我做 sudo gem environment 我得到

sudo gem environment
RubyGems Environment:
 - RUBYGEMS VERSION: 1.8.24
 - RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [x86_64-darwin11.4.2]
 - INSTALLATION DIRECTORY: /Users/jeffreyerickatz/.rvm/rubies/ruby-1.9.3-  p194/lib/ruby/gems/1.9.1
 - RUBY EXECUTABLE: /Users/jeffreyerickatz/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
 - EXECUTABLE DIRECTORY: /Users/jeffreyerickatz/.rvm/rubies/ruby-1.9.3-p194/bin
 - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
 - GEM PATHS:
     - /Users/jeffreyerickatz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1
     - /Users/jeffreyerickatz/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
 - :update_sources => true
 - :verbose => true
 - :benchmark => false
 - :backtrace => false
 - :bulk_threshold => 1000
- REMOTE SOURCES:
   - http://rubygems.org/

宝石路径

new-host-2:Desktop jeffreyerickatz$ echo $GEM_HOME
/Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194
4

1 回答 1

0

如果您正确复制粘贴,则似乎 gem 正在安装到“/Users/jeffreyerickatz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1”中(注意 1.9 之间的空格.3- 和 p194)。

您可以通过 进一步检查echo $GEM_HOME。$GEM_HOME 应该设置为您的 gem 路径。

于 2012-12-28T22:59:23.447 回答