Whenever I do bundle install
all of the gems get installed at
app_dir/vendor/bundle
path and consumes loads of disk space. I also tried installing gems where it should get installed i.e gemsets while development by this:
bundle install --no-deployement
but this isn't working for me and installeing gems at vendor/bundle
. How can I make it to be installed globally for all applications or in ruby gemsets location ? I also tried removing .bundle/config
but nothing changed.
I am using:
rvm version: 1.23.14
ruby version: 2.0.0-p247
rails 3.2.13
Here is my ~/.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
My ~/.bashrc
:
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
Some other information that you might need:
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
I tried this also but didn't helped:
bundle install --system
and removing .bundle
directory.
Please help me in installing gems in gemsets not vendor/bundle
or a default place.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…