Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In my mackbook, when I try to connect to my rails application in office I can't , in the office there are some http proxy , and when I run my rails like this :

sudo rails s -p8080
=> Booting WEBrick
=> Rails 3.0.5 application starting in development on http://0.0.0.0:8080
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-03-20 12:49:34] INFO  WEBrick 1.3.1
[2012-03-20 12:49:34] INFO  ruby 1.8.7 (2010-01-10) [universal-darwin11.0]
[2012-03-20 12:49:34] INFO  WEBrick::HTTPServer#start: pid=17439 port=8080

The local IP is :

en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether f8:1e:df:d8:8c:25 
inet6 fe80::fa1e:dfff:fed8:8c25%en1 prefixlen 64 scopeid 0x5 
inet 10.21.21.240 netmask 0xffffff00 broadcast 10.21.21.255
media: autoselect
status: active

so when I try in the browser to trigger localhost:8080 or 10.21.21.240:8080 , it seems that I can't trigger my application

enter image description here

as for the proxy check out the following : enter image description here

Any Ideas ?

The weird thing is that when I try to curl I get some response and work :

curl http://10.21.21.240:8080 
<html><body>You are being <a href="http://10.21.21.240:8080/login">redirected</a>.</body></html>%
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Your office proxy probably knows how to get to the public Internet, but not your private network.

In your proxy settings, add an entry to bypass the proxy for the 10/8 network (that means any 10.x.y.z address). So make that text field look like this:

*.local, 169.254/16, 10/8

Note that curl is a portable open source tool that doesn't tend to adopt any platform-specific technologies when it can avoid it, so it almost certainly doesn't honor Mac OS X's proxy settings (unlike most GUI/Cocoa browsers would). That would explain why curl is working while your GUI-based browser is not.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.