Installing Ruby in Linux behind a firewall or where you don't root access

Ok, so the topic can be found very easy! But how will you be installing in a linux box, in which you don’t have root/admin access, and/or ports are blocked by firewall.

  1. Install WinScp
  2. Connect to the linux box
  3. Transfer the .gem files downloaded from gem repository, to the linux box

[doel@MY_LINUX_SERVER~]$ gem install rails --local /home/doel/rails-4.0.2.gem
ERROR:  While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: sprockets-rails requires sprockets (~> 2.8); railties requires thor (< 2.0, >= 0.18.1); actionmailer requires mail (~> 2.5.4); activerecord requires arel (~> 4.0.0), activerecord-deprecated_finders (~> 1.0.2); activemodel requires builder (~> 3.1.0); actionpack requires builder (~> 3.1.0), rack-test (~> 0.6.2), erubis (~> 2.7.0); activesupport requires i18n (>= 0.6.4, ~> 0.6), multi_json (~> 1.3), tzinfo (~> 0.3.37), thread_safe (~> 0.1)

In order to install all the dependencies, you need to install all the gem one by one.Though it's a laborious task, but unless you are getting admin/root access it's another workaround.


Popular Posts