Download and Install Ruby

[https://rubyinstaller.org/downloads/](https://rubyinstaller.org/downloads/)
\> ruby -v
ruby 2.4.4p296 (2018-03-28 revision 63013) \[x64-mingw32\]

Download Jekyll with its all gems dependencies on Internet-connected machine

Install Bundler

\> gem install bundler
Successfully installed bundler-1.16.1
Parsing documentation for bundler-1.16.1
Done installing documentation for bundler after 6 seconds
1 gem installed

> bundle -v
Bundler version 1.16.1

or

\> gem install -f --local bundler-1.16.1.gem

Generate a Gemfile

\> bundle init
Writing new Gemfile to C:\\current\_path\\Gemfile

Modify Gemfile

source "https://rubygems.org" 
gem 'jekyll', '3.7.3'

Download Jekyll and its all gems dependencies by reading the Gemfile

\> bundle package
Fetching gem metadata from http://rubygems.org/..............
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Fetching public\_suffix 3.0.2
Installing public\_suffix 3.0.2
Fetching addressable 2.5.2
Installing addressable 2.5.2
Using bundler 1.16.1
Fetching colorator 1.1.0
Installing colorator 1.1.0
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching eventmachine 1.2.5 (x64-mingw32)
Installing eventmachine 1.2.5 (x64-mingw32)
Fetching http\_parser.rb 0.6.0
Installing http\_parser.rb 0.6.0 with native extensions
Fetching em-websocket 0.5.1
Installing em-websocket 0.5.1
Fetching ffi 1.9.23 (x64-mingw32)
Installing ffi 1.9.23 (x64-mingw32)
Fetching forwardable-extended 2.6.0
Installing forwardable-extended 2.6.0
Fetching i18n 0.9.5
Installing i18n 0.9.5
Fetching rb-fsevent 0.10.3
Installing rb-fsevent 0.10.3
Fetching rb-inotify 0.9.10
Installing rb-inotify 0.9.10
Fetching sass-listen 4.0.0
Installing sass-listen 4.0.0
Fetching sass 3.5.6
Installing sass 3.5.6
Fetching jekyll-sass-converter 1.5.2
Installing jekyll-sass-converter 1.5.2
Fetching ruby\_dep 1.5.0
Installing ruby\_dep 1.5.0
Fetching listen 3.1.5
Installing listen 3.1.5
Fetching jekyll-watch 2.0.0
Installing jekyll-watch 2.0.0
Fetching kramdown 1.16.2
Installing kramdown 1.16.2
Fetching liquid 4.0.0
Installing liquid 4.0.0
Fetching mercenary 0.3.6
Installing mercenary 0.3.6
Fetching pathutil 0.16.1
Installing pathutil 0.16.1
Fetching rouge 3.1.1
Installing rouge 3.1.1
Fetching safe\_yaml 1.0.4
Installing safe\_yaml 1.0.4
Fetching jekyll 3.7.3
Installing jekyll 3.7.3
Bundle complete! 1 Gemfile dependency, 26 gems now installed.
Use \`bundle info \[gemname\]\` to see where a bundled gem is installed.
Updating files in vendor/cache
  \* public\_suffix-3.0.2.gem
  \* addressable-2.5.2.gem
  \* colorator-1.1.0.gem
  \* concurrent-ruby-1.0.5.gem
  \* eventmachine-1.2.5-x64-mingw32.gem
  \* http\_parser.rb-0.6.0.gem
  \* em-websocket-0.5.1.gem
  \* ffi-1.9.23-x64-mingw32.gem
  \* forwardable-extended-2.6.0.gem
  \* i18n-0.9.5.gem
  \* rb-fsevent-0.10.3.gem
  \* rb-inotify-0.9.10.gem
  \* sass-listen-4.0.0.gem
  \* sass-3.5.6.gem
  \* jekyll-sass-converter-1.5.2.gem
  \* ruby\_dep-1.5.0.gem
  \* listen-3.1.5.gem
  \* jekyll-watch-2.0.0.gem
  \* kramdown-1.16.2.gem
  \* liquid-4.0.0.gem
  \* mercenary-0.3.6.gem
  \* pathutil-0.16.1.gem
  \* rouge-3.1.1.gem
  \* safe\_yaml-1.0.4.gem
  \* jekyll-3.7.3.gem

'bundle package --no-install' will skip the installation.

Move the files in the current path to the machine not connected to Internet

current\_dir
├─ vendor
│  └─ cache
│     ├─ addressable-2.5.2.gem
│     ├─ colorator-1.1.0.gem
│     ├─ concurrent-ruby-1.0.5.gem
│     ├─ em-websocket-0.5.1.gem
│     ├─ eventmachine-1.2.5-x64-mingw32.gem
│     ├─ ffi-1.9.23-x64-mingw32.gem
│     ├─ forwardable-extended-2.6.0.gem
│     ├─ http\_parser.rb-0.6.0.gem
│     ├─ i18n-0.9.5.gem
│     ├─ jekyll-3.7.3.gem
│     ├─ jekyll-sass-converter-1.5.2.gem
│     ├─ jekyll-watch-2.0.0.gem
│     ├─ kramdown-1.16.2.gem
│     ├─ liquid-4.0.0.gem
│     ├─ listen-3.1.5.gem
│     ├─ mercenary-0.3.6.gem
│     ├─ pathutil-0.16.1.gem
│     ├─ public\_suffix-3.0.2.gem
│     ├─ rb-fsevent-0.10.3.gem
│     ├─ rb-inotify-0.9.10.gem
│     ├─ rouge-3.1.1.gem
│     ├─ ruby\_dep-1.5.0.gem
│     ├─ safe\_yaml-1.0.4.gem
│     ├─ sass-3.5.6.gem
│     └─ sass-listen-4.0.0.gem
├─ Gemfile
└─ Gemfile.rock

Install Jekyll on machine not connected to Internet

Using bundle install (recommended)

\> bundle install --local
...
25 gems installed

> jekyll -v
jekyll 3.7.3

Using gem install on the cache folder

vendor\\cache> gem install --local jekyll-3.7.3.gem
...
25 gems installed

vendor\\cache> jekyll -v
jekyll 3.7.3

Update Gems (run as administrator)

cmd> gem update

References

  1. http://help.rubygems.org/discussions/questions/79-installing-rubygems-on-machine-not-connected-to-internet
  2. https://stackoverflow.com/questions/4402819/download-all-gems-dependencies
  3. https://stackoverflow.com/questions/11291235/ruby-gem-dependencies-on-offline-server