Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gem install XYZ locally (without connection to the internet)

I need to install win32-api and antlr3 on a computer without internet connection. Had it such a connection, I'd use gem like so:

gem install win32-api -r
gem install antlr3 -r

This won't obviously work. So, I thought there should be a way to download the gem and install it later, but I am not sure how I would proceed.

I found gem's which operator, which seemd to indicate the local location of a gem:

c:\>gem which antlr3
c:/tools/Ruby187/lib/ruby/gems/1.8/gems/antlr3-1.8.8/lib/antlr3.rb

however, it didn't work on win32-api:

c:\>gem which win32-api
ERROR:  Can't find ruby library file or shared library win32-api

although I have previously installed it.

Can someone hint at the right direction to go on from here?

like image 397
René Nyffenegger Avatar asked Jan 21 '11 11:01

René Nyffenegger


1 Answers

Try,

gem install --local path/to/file.gem

like image 79
srcspider Avatar answered Nov 15 '22 11:11

srcspider