Ruby On Rails 3.x Offline Install (No Internet Connection)

I really appreciate if you can give an idea of ​​how to install ruby ​​on rails 3.x on a computer without an internet connection.

All tutorials or explanations seem to suggest that there is always an internet connection. There is an easy way to download a package with all the dependencies included and just install the package.

Thanks in advance

+6
source share
3 answers

At last. A complete list of gems that you need to manually download to install Rails offline (or behind a proxy server that prevents your gem commands from working).

This list assumes that you already have the following things (Windows 7):

Go to rubygems.org and use the search function to download each of the following Gems. You do not need to enter a full name with version numbers, etc. For example, only "actionmailer" will work and find the latest version).

Each gem page displays a command line that you must enter when it is normally installed on a computer that is not behind the proxy server. Ignore it and just click the download link.

  • ActionMailer-3.2.6.gem
  • actionpack-3.2.6.gem
  • ActiveRecord-3.2.6.gem
  • activeresource-3.2.6.gem
  • ActiveSupport-3.2.6.gem
  • Rake-0.9.2.2.gem
  • i18n-0.6.0.gem
  • multi_json-1.3.6.gem
  • ActiveModel-3.2.6.gem
  • Arel-3.0.2.gem
  • tzinfo-0.3.33.gem
  • builder-3.0.0.gem
  • erubis-2.7.0.gem
  • travel-1.0.4.gem
  • rack-mount 1.4.1.gem
  • rack cache 1.2.gem
  • rack-mount test 0.6.1.gem
  • Asterisks-2.1.3.gem
  • hike-1.2.1.gem
  • swivel-1.3.3.gem
  • mail 2.4.4.gem
  • mime types-1.19.gem
  • Treetop-1.4.10.gem
  • polyglot-0.3.3.gem
  • Rails-3.2.6.gem
  • batching-1.1.4.gem
  • Railties-3.2.6.gem
  • rack-mount SSL-1.3.2.gem
  • RDoc-3.12.gem
  • Thor-0.15.3.gem
  • JSON-1.7.3.gem

(31 files total)

Just keep in mind that versions are subject to change. I did this in June 2012, and these were the versions that worked for me.

Copy all of these files into the Ruby installation directory. Then open the CMD console.

cd \ cd <RubyInstallDir> gem install rails-3.2.6.gem 

Installation should be performed normally. It is possible that some dependencies need a different version. In this case, the error message will show you the correct version. Therefore, you just need to download the version from rubygems.org (there is a list of old versions on the gem page) and run the gem installation command again.

Hope this helps.

+7
source

You can use bundler to achieve this. The bundler accepts a path where you can specify a location for the mounted stones. Run the following command in which you have an internet connection. It will download all the dependencies and pack them into the specified folder.

 bundle install --path gems # 'gems' is the folder present in Rails.root 

Now that all the dependencies are in the project, you can copy the project to a machine where you do not have an Internet connection. From now on, use commands like:

 bundle exec rails server bundle exec rails console 

Please note that you need to install the pick-up crane manually on the target machine.

+2
source

I know this question relates to Rails 3, but I created PortableRails precisely because of this (which has recently been updated to support Rails 4). Just make sure you run bundle --local instead of just bundle (this is what the new action is trying to do).

0
source

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


All Articles