我搜索过类似的问题,但仍然无法解决这个问题。我安装了我的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环境时,我得到了
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
答案 0 :(得分:0)
如果您正确复制粘贴,看起来宝石正在安装到“/Users/jeffreyerickatz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/.1.9.1”中(请注意1.9.3-和p194之间的空间。
您可以echo $GEM_HOME
进一步检查。 $ GEM_HOME应设置为您的宝石路径。