我在我的$HOME
目录中安装 gems
$ cat .gemrc
-----------------------------------
gemhome: ~/.gems
gempath: /usr/lib/ruby/gems/1.9.1
-----------------------------------
$ gem install rspec
installs rspec in ~/.gems/gems/rspec-*
$ gem list
*** LOCAL GEMS ***
diff-lcs (1.2.4)
rspec (2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
rspec-mocks (2.13.1)
$ rspec test_rspec.rb
cant find rspec -- apparently its not in $PATH
$ gem uninstall rspec
INFO: gem "rspec" is not installed
谁能帮我?我没有使用 rvm,我想先了解这些工具。
谢谢
更新:
env | grep GEM
什么都不返回
gem env
RubyGems 环境:
- 红宝石版本:1.8.23
- 红宝石版本:1.9.3(2013-05-15 补丁级别 429)[i486-linux]
- 安装目录:~/.gems/
- 红宝石可执行文件:/usr/bin/ruby
- 可执行目录:~/.gems/bin
- 红宝石平台:
- 红宝石
- x86-linux
- 宝石路径:
- ~/.gems/
- /usr/lib/ruby/gems/1.9.1 ~/.gems/
- 宝石配置:
- :update_sources => 真
- :详细 => 真
- :基准 => 假
- :回溯 => 假
- :bulk_threshold => 1000
- "gemhome" => "~/.gems/"
- "gempath" => "/usr/lib/ruby/gems/1.9.1 ~/.gems/"
- 远程资源: