Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put Ruby dependencies in local project folder

Tags:

ruby

rubygems

Is there a way to put a ruby gem dependencies inside the project root folder ( in vendor directory or something similar ) ?

like image 532
med_abidi Avatar asked May 13 '26 05:05

med_abidi


1 Answers

Run bundle package to cache gems to ./vendor/cache. As the docs point out, bundler will still look for platform-specific gems on rubygems.org. If you have control over the platforms (e.g. same development and deployment platforms), then you can use bundle install --local in addition to bundle package. You may also want to consider a command like bundle install --path vendor/bundle in this case.

like image 53
Ben Taitelbaum Avatar answered May 16 '26 08:05

Ben Taitelbaum



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!