我在我的$HOME
目录
$ 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环境: