gemstash icon indicating copy to clipboard operation
gemstash copied to clipboard

Gemstash always redirects to rubygems.org

Open lukebigum opened this issue 8 years ago • 3 comments

Hello,

Is it possible to use Gemstash as a proxy? When I invoke gem install from a server that can't reach the internet, the server requests /latest_specs.4.8.gz to which Gemstash returns a 302 redirect rather than attempting to fetch the file itself:

[2017-08-02 16:24:11 +0000] - INFO - 1.1.1.1 - - [02/Aug/2017:16:24:11 +0000] "GET /latest_specs.4.8.gz HTTP/1.1" 302 - 0.0011

Is this the correct behaviour? I was hoping to use Gemstash to install Gems for servers behind a firewall.

lukebigum avatar Aug 02 '17 16:08 lukebigum

I have the same question. I would like to configure gemstash as a source for rubygems, e.g.

gem sources -a http://localhost:9292
gem sources -r https://rubygems.org/
gem install nokogiri

jasonwbarnett avatar Dec 03 '17 22:12 jasonwbarnett

Gemstash was originally created as a proxy for Bundler, so as of today it only proxies requests for the Bundler API. It does a small amount of caching, but it does not (yet) support fully-offline operation. Pull requests to add that would be welcome!

indirect avatar Dec 03 '17 22:12 indirect

Can we run ruby gem on a server running behind the firewall, and rubygem.org is only accessible from proxy?

How can I tell gemstash to connect rubygem.org with http_proxy? I have tried with http_proxy in .gemrc and also set https_proxy="proxy.com" and http_proxy="proxy.com" but still getting error 302.

Any suggestion ?

talhajilal avatar Jun 06 '23 15:06 talhajilal