Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the target path for bundle install?

Tags:

bundler

gem

on my home box the bundle install command does ask for password and installs the gems in

/var/lib/gems/1.8/gems/...

but in office they are installed in my ~/.bundler/cache/git or at least cached there and not installed in main filesystem

I cant figure out how to set the path they are installed. pls help!

like image 662
groovehunter Avatar asked Nov 24 '11 13:11

groovehunter


Video Answer


1 Answers

You can specify where the gems are installed by using

bundle install --path [directory]

This is not normally necessary; you can usually just do 'bundle install' and you're good to go.

When you want to include the gems for deployment, you will want to use

bundle package

which will, by default, put your gems in ./vendor/cache. If you subsequently deploy the project and do

bundle install --deployment

Bundler will source the files from that directory and install them into ./vendor/bundle. More information is available by doing

bundle help install

Hope this is useful.

like image 116
Henry Collingridge Avatar answered Oct 22 '22 20:10

Henry Collingridge