# Problem installing Rails

**URL:** <https://www.ruby-forum.com/t/problem-installing-rails/87930>\
**Category:** Rails\
**Created:** [March 27, 2006, 9:34pm UTC](https://www.ruby-forum.com/t/problem-installing-rails/87930 "2006-03-27T21:34:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![more2hari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@more2hari](https://www.ruby-forum.com/u/more2hari)\
**Post date:** [March 27, 2006, 9:34pm UTC](https://www.ruby-forum.com/t/problem-installing-rails/87930/1 "2006-03-27T21:34:38Z")

</div>

Hi  
I am getting the following error when i tried to install rails in  
windows using command prompt…

Attempting remote installation of ‘rails’  
Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
ERROR: While executing gem … (Gem::RemoteSourceException)  
Error fetching remote gem cache: getaddrinfo: no address associated  
with hostname.

There are proxy settings in my institute and i need to set it up from  
the command prompt? pls explain with an example…

Thanks in Advance…

---

<div class="post-metadata">

**Author:** ![more2hari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@more2hari](https://www.ruby-forum.com/u/more2hari)\
**Post date:** [March 27, 2006, 10:01pm UTC](https://www.ruby-forum.com/t/problem-installing-rails/87930/2 "2006-03-27T22:01:45Z")

</div>

On 3/27/06, Hari N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> There are proxy settings in my institute and i need to set it up from  
> the command prompt? pls explain with an example…

Hari,

You can tell gem to use a proxy server by (I believe) either setting the  
HTTP\_PROXY environment variable, or by setting the -p (–http-proxy)  
flag  
when invoking gem. e.g.

$ export HTTP\_PROXY=[http://myproxy:80/](http://myproxy:80/)  
$ gem install foo

or

$ gem install --http-proxy [http://myproxy:80/](http://myproxy:80/) foo

~ j.

---

<div class="post-metadata">

**Author:** ![more2hari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@more2hari](https://www.ruby-forum.com/u/more2hari)\
**Post date:** [March 27, 2006, 10:03pm UTC](https://www.ruby-forum.com/t/problem-installing-rails/87930/3 "2006-03-27T22:03:07Z")

</div>

I’m not the best person to answer Windows questions. Haven’t used it for  
a good long while. (emphasis on the ‘good’)

But if you know the url for your proxy, you can set up gem to go through  
it

Look here:  
[http://docs.rubygems.org/read/chapter/13](http://docs.rubygems.org/read/chapter/13)

in section 5.10

-sean

Hari N. wrote:

> Hi  
> I am getting the following error when i tried to install rails in  
> windows using command prompt…
> 
> Attempting remote installation of ‘rails’  
> Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
> ERROR: While executing gem … (Gem::RemoteSourceException)  
> Error fetching remote gem cache: getaddrinfo: no address associated  
> with hostname.
> 
> There are proxy settings in my institute and i need to set it up from  
> the command prompt? pls explain with an example…
> 
> Thanks in Advance…

---

<div class="post-metadata">

**Author:** ![more2hari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@more2hari](https://www.ruby-forum.com/u/more2hari)\
**Post date:** [April 27, 2006, 12:54am UTC](https://www.ruby-forum.com/t/problem-installing-rails/87930/4 "2006-04-27T00:54:39Z")

</div>

Hi,  
In Windows, you can directly set the environment variables in the  
command prompt. Set the variables HTTP\_PROXY, HTTP\_PROXY\_USER and  
HTTP\_PROXY\_PASS, and then execute “gem install rails --remote”.  
This should make it work.  
Thanks!!!

---

<div class="post-metadata">

**Author:** ![more2hari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@more2hari](https://www.ruby-forum.com/u/more2hari)\
**Post date:** [March 27, 2006, 10:09pm UTC](https://www.ruby-forum.com/t/problem-installing-rails/87930/5 "2006-03-27T22:09:36Z")

</div>

thanx but i’m using windows and tats the problemm…if it hab been linux  
i could have installed it earlier itself

John B. wrote:

> On 3/27/06, Hari N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > There are proxy settings in my institute and i need to set it up from  
> > the command prompt? pls explain with an example…
> 
> Hari,
> 
> You can tell gem to use a proxy server by (I believe) either setting the  
> HTTP\_PROXY environment variable, or by setting the -p (–http-proxy)  
> flag  
> when invoking gem. e.g.
> 
> $ export HTTP\_PROXY=[http://myproxy:80/](http://myproxy:80/)  
> $ gem install foo
> 
> or
> 
> $ gem install --http-proxy [http://myproxy:80/](http://myproxy:80/) foo
> 
> ~ j.

---

<div class="post-metadata">

**Author:** ![more2hari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@more2hari](https://www.ruby-forum.com/u/more2hari)\
**Post date:** [April 24, 2007, 3:03pm UTC](https://www.ruby-forum.com/t/problem-installing-rails/87930/6 "2007-04-24T15:03:56Z")

</div>

John B. wrote:

> On 3/27/06, Hari N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > There are proxy settings in my institute and i need to set it up from  
> > the command prompt? pls explain with an example…
> 
> Hari,
> 
> You can tell gem to use a proxy server by (I believe) either setting the  
> HTTP\_PROXY environment variable, or by setting the -p (–http-proxy)  
> flag  
> when invoking gem. e.g.
> 
> $ export HTTP\_PROXY=[http://myproxy:80/](http://myproxy:80/)  
> $ gem install foo
> 
> or
> 
> $ gem install --http-proxy [http://myproxy:80/](http://myproxy:80/) foo
> 
> ~ j.

EXCELENTE ME FUNCIONO CON  
set HTTP\_PROXY=[http://MIPROXY:8080/](http://MIPROXY:8080/)
