每当我做 bundle install
所有的宝石得到安装
app_dir/vendor/bundle
路径并消耗大量磁盘空间。我还尝试在应该安装 gem 的地方安装 gem,比如在开发的时候安装 gemsets:
bundle install --no-deployement
但是在 vendor/bundle
安装宝石对我来说不管用。我如何才能使它安装在全球所有应用程序或红宝石宝石位置?我也尝试删除 .bundle/config
,但没有任何改变。
我使用:
rvm version: 1.23.14
ruby version: 2.0.0-p247
rails 3.2.13
这是我的 ~/.bash_profile
:
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
eval "$(rbenv init -)"
alias pg='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log'
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
我的 ~/.bashrc
:
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
您可能需要的其他信息:
aman@Amandeeps-MacBook-Pro ~/Projects/qe (develop)*$ which bundle
/Users/aman/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle
aman@Amandeeps-MacBook-Pro ~/Projects/qe (develop)*$ rbenv which bundle
/Users/aman/.rbenv/versions/2.0.0-p247/bin/bundle
amandeep@Amandeeps-MacBook-Pro ~/Projects/qe (develop)*$ rbenv which ruby
/Users/aman/.rbenv/versions/2.0.0-p247/bin/ruby
aman@Amandeeps-MacBook-Pro ~/Projects/qe (develop)*$ rbenv gemset active
rbenv: NO such command `gemset'
aman@Amandeeps-MacBook-Pro ~/Projects/qe (develop)*$ which rails
/Users/aman/.rvm/gems/ruby-2.0.0-p247@global/bin/rails
我也试过,但没有用:
bundle install --system
并删除 .bundle
目录。
请帮助我安装宝石在宝石集不 vendor/bundle
或默认的地方。