# Rails and Ruby behind proxy

**URL:** <https://www.ruby-forum.com/t/rails-and-ruby-behind-proxy/155201>\
**Category:** Rails\
**Created:** [December 9, 2008, 10:29am UTC](https://www.ruby-forum.com/t/rails-and-ruby-behind-proxy/155201 "2008-12-09T10:29:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_Alpi\_aka\_Sp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a5b964/32.png) [@Nicolas\_Alpi\_aka\_Sp](https://www.ruby-forum.com/u/Nicolas_Alpi_aka_Sp)\
**Post date:** [December 9, 2008, 10:29am UTC](https://www.ruby-forum.com/t/rails-and-ruby-behind-proxy/155201/1 "2008-12-09T10:29:54Z")

</div>

Hi there,

I’ve a little problem.

On my code, I use the flickraw gem. On the application.rb there is a  
require ‘flickraw’ who create a new instance, and for that need to  
pass the net.

It works at home, but in my office we have a proxy, and when I launch  
webrick I have an error saying that I’m behind a proxy :(.

Does anyone have an idea on how to correct this issue ? Is there a  
config.http\_proxy in environement.rb or something like that ?

Thank you very much

Nic

---

<div class="post-metadata">

**Author:** ![Nicolas\_Alpi\_aka\_Sp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a5b964/32.png) [@Nicolas\_Alpi\_aka\_Sp](https://www.ruby-forum.com/u/Nicolas_Alpi_aka_Sp)\
**Post date:** [December 9, 2008, 11:36am UTC](https://www.ruby-forum.com/t/rails-and-ruby-behind-proxy/155201/2 "2008-12-09T11:36:17Z")

</div>

Reply to myself,

I’ve temporary corrected this by adding Net::HTTP::Proxy  
(“xxxx”,“8080”) in the code of the gem.

I’ll try to submit a patch with an ENV.

Cheers

Nic

On Dec 9, 9:29 am, Nicolas Alpi aka Spyou [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Nicolas\_Alpi\_aka\_Sp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a5b964/32.png) [@Nicolas\_Alpi\_aka\_Sp](https://www.ruby-forum.com/u/Nicolas_Alpi_aka_Sp)\
**Post date:** [December 9, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/rails-and-ruby-behind-proxy/155201/3 "2008-12-09T17:12:47Z")

</div>

Try setting an environment variable like so:

http\_proxy=http://my.proxy.server.mycompany.com:port\_number

With the appropriate URI to your proxy server of course.

HTH,

-Roy
