Ruby gem dependency on a standalone server

I have a server that is completely disconnected from the Internet (for some strange security reasons).

How can I use Ruby dependencies for different gems in this environment? It can work with the Bundler , but how to install the Bundler using gem without an internet connection?

+13
source share
1 answer

You can download bundler as a .gem file from rubygems and install it on the server using

 gem install /path/to/bundler.gem 

You can then pack all the gems needed for your application into the ./vendor/cache directory with

 bundle package 

If now you deploy your application (along with ./vendor/cache ) on the server and run

 bundle install --local 

bundler will not go to rubygems, but instead will install all the gems from the ./vendor/cache directory.

See bundler-package docs for more details.

+21
source

Source: https://habr.com/ru/post/1484800/


All Articles