Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Ruby Gems without access to the official repository

Tags:

rubygems

I'm connected to the internet using a proxy script in my office. As a result my command prompt (Win XP) doesn't connect and I can access net only using the browser.

Is there some I can install some ruby gems that I need manually - without using

gem install 'abc'

Or is there a way I can get my command prompt to connect to the internet. Although my IE settings do use the script, I still cant get the CMD to connect.

like image 456
Prakhar Avatar asked Apr 25 '11 13:04

Prakhar


People also ask

How do I download RubyGems?

Open up the 'Software Center' app from your launcher and type in `RubyGems` without quotes into the application search box at the top right, and press [enter]. RubyGems then can be installed by just clicking on the button labeled 'Install', thats it.

Where do RubyGems get installed?

When you use the --user-install option, RubyGems will install the gems to a directory inside your home directory, something like ~/. gem/ruby/1.9. 1 . The commands provided by the gems you installed will end up in ~/.


2 Answers

I had the same problem when working on a confined environment. A nice workaround is to download the gem that you are interested in a usb stick and then install it manually.

This is the website where you can find all available ruby gems. Ruby gems download. Find the one you are interested and download it.

Then move the gem in a directory of your choice and cd into that from the command prompt. I am using C:/ruby193/bin/pony-1.4.gem

Let's say that the gem we are interested in is the pony gem (smtp email).

Just type gem install pony-1.4.gem

and you should get it installed manually unless you have a restricted acc with not adequate administrative privileges.

like image 106
Xwris Stoixeia Avatar answered Oct 12 '22 13:10

Xwris Stoixeia


gem install --force --local *.gem

http://help.rubygems.org/kb/rubygems/installing-gems-with-no-network

like image 39
Chris Avatar answered Oct 12 '22 15:10

Chris