每当我做bundle install
所有的宝石都安装在
app_dir/vendor/bundle
路径并消耗大量磁盘空间。我还尝试在应该安装的地方安装gems,即在开发时通过以下方式安装gemsets:
bundle install --no-deployement
但这对我不起作用,并且在vendor/bundle
. 如何让它为所有应用程序全局安装或安装在 ruby gemsets 位置?我也尝试删除.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
目录。
请帮助我在 gemsetsvendor/bundle
或默认位置安装 gems。