我rbenv
使用安装homebrew
并安装2.0.0p347
,然后在我的项目文件夹中运行bundle install
并将我的 gem 安装到vendor/bundle
. 但是当我跑步时,gem list
我看不到它们。
myproject(development)» rbenv 版本系统 * 2.0.0-p247 (由 /Users/rege/Code/myproject/.ruby-version 设置)
我也跑rbenv rehash
我的配置:
~» echo $PATH.
/Users/rege/.gem/bin:/Users/rege/.rbenv/shims:/Users/rege/.rbenv/bin:/usr/local/heroku/bin:/usr/local/bin:/Users/rege/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin.
.zshrc
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# Gem
export GEM_HOME="$HOME/.gem"
export GEM_PATH="$HOME/.gem"
### PATH
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/heroku/bin:$PATH"
export PATH=$(rbenv root)/shims:$(rbenv root)/bin:$PATH
export PATH="$HOME/.gem/bin:$PATH"
~» gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.1.10
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin13.0.0]
- INSTALLATION DIRECTORY: /Users/rege/.gem
- RUBY EXECUTABLE: /Users/rege/.rbenv/versions/2.0.0-p247/bin/ruby
- EXECUTABLE DIRECTORY: /Users/rege/.gem/bin
- SPEC CACHE DIRECTORY: /Users/rege/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-13
- GEM PATHS:
- /Users/rege/.gem
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-ri --no-rdoc"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/rege/.rbenv/versions/2.0.0-p247/bin
- /usr/local/Cellar/rbenv/0.4.0/libexec
- /Users/rege/.gem/bin
- /Users/rege/.rbenv/shims
- /Users/rege/.rbenv/bin
- /usr/local/heroku/bin
- /usr/local/bin
- /Users/rege/.rbenv/shims
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/bin
myproject(development)» which bundle
/Users/rege/.gem/bin/bundle