# GEM Problem

**URL:** <https://www.ruby-forum.com/t/gem-problem/74588>\
**Category:** Ruby\
**Created:** [November 7, 2006, 10:48am UTC](https://www.ruby-forum.com/t/gem-problem/74588 "2006-11-07T10:48:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [November 7, 2006, 10:48am UTC](https://www.ruby-forum.com/t/gem-problem/74588/1 "2006-11-07T10:48:58Z")

</div>

Hi guys im getting this error using gems on windows im behind a proxy  
but i set it to work from the command line. So i really don’t know  
what the problem is.

Thanks in advance

## Error message

ERROR: While executing gem … (URI::InvalidURIError)  
can not set user with registry or opaque

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/gem-problem/74588/2 "2006-11-07T10:54:34Z")

</div>

Hi,

```
   Actually I think the command line is the better way. The command

```

lines like “C:\Documents and Settings\>gem install rails --remote” also  
work  
for me behind a proxy.  
Maybe you can show more details about what you called “gems on  
windows im”? You did not tell us much about it.

Enjoy!

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/gem-problem/74588/3 "2006-11-07T10:54:47Z")

</div>

Well im using gem in a Microsoft Windows cmd, i don’t know if its have  
some problems with the environment or something like that.

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [November 7, 2006, 10:57am UTC](https://www.ruby-forum.com/t/gem-problem/74588/4 "2006-11-07T10:57:30Z")

</div>

Hi,

Pls pay attention to the points below:

1. Did you use a firewall that might block gem’s communication? You can  
turn  
off your firewall to have a try.
2. Did you set a correct env variable HTTP\_PROXY? Or did you add the  
option  
“-p” to your gem command?  
-p, --[no-]http-proxy [URL] Use HTTP proxy for remote operations
3. Can you ping urls like [http://gems.rubyforge.org](http://gems.rubyforge.org) successfully?  
Hope you can succeed.

Rgds,

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [November 7, 2006, 10:59am UTC](https://www.ruby-forum.com/t/gem-problem/74588/5 "2006-11-07T10:59:20Z")

</div>

Rafael G. wrote:

> No i can’t ping it, but that only means that icmp is blocked i thought  
> gems used HTTP connection, anyway is there another solution for me to  
> get rails and mongrel ?

When all else fails (your local proxying scheme is convoluted, some  
obscure Internet Explorer only solution, authenticated, etc.), you can  
always just download the gem files from [RubyGems.org | your community gem host](http://gems.rubyforge.org/gems/),  
and install them from the download folder using “gem install \*.gem” - of  
course, you have to resolve various dependencies yourself in that case.

David V.

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [November 7, 2006, 10:58am UTC](https://www.ruby-forum.com/t/gem-problem/74588/6 "2006-11-07T10:58:21Z")

</div>

On 11/3/06, shiwei zhang [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> Pls pay attention to the points below:
> 
> 1. Did you use a firewall that might block gem’s communication? You can turn  
> off your firewall to have a try.  
> I don’t have a local firewall.
> 2. Did you set a correct env variable HTTP\_PROXY? Or did you add the option  
> “-p” to your gem command?  
> Yes im using HTTP\_PROXY, i tested with pear and its works fine.  
> -p, --[no-]http-proxy [URL] Use HTTP proxy for remote operations
> 3. Can you ping urls like [http://gems.rubyforge.org](http://gems.rubyforge.org) successfully?  
> No i can’t ping it, but that only means that icmp is blocked i thought  
> gems used HTTP connection, anyway is there another solution for me to  
> get rails and mongrel ?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [November 7, 2006, 10:59am UTC](https://www.ruby-forum.com/t/gem-problem/74588/7 "2006-11-07T10:59:21Z")

</div>

Thanks, i’ll do that.

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [November 7, 2006, 11:02am UTC](https://www.ruby-forum.com/t/gem-problem/74588/8 "2006-11-07T11:02:11Z")

</div>

shiwei zhang wrote:

> ```
> Actually I think the command line is the better way. The command
> 
> ```
> 
> lines like “C:\Documents and Settings\>gem install rails --remote” also work  
> for me behind a proxy.

The proxy issue is completely and totally unrelated to how you use the  
rubygems API. If you set your http\_proxy environment variable to  
[http://yourproxyname:3128/](http://yourproxyname:3128/), rubygems will pick it up.

David V.
