Wednesday, July 11, 2007

Serving Rails On OS X Over An Internal Network

This post's kinda noob-oriented, but hey, noobs need love too.

According to Western astrology, there's this thing called Mercury retrograde. During Mercury retrograde, messages are jumbled, meanings are confused, and computers break. Currently, we're in a period of Mercury retrograde.



Whether Mercury retrograde really exists or not, computers have been breaking a lot recently in my neck of the woods. Just as soon as I brought one app back to life following a total hardware meltdown, the server for the app I'm developing started throwing crazy errors, with hundreds of sleeping httpd threads for no known reason.

I'm at a large company and all authority for this machine rests with other people. Meanwhile, I've got an app to develop, and people need to be able to see it over the network. The obvious logical choice here is to give them my IP address - but first I have to knock out the OS X firewall. Doing this is very easy.



Go to System Preferences, go to Sharing, and go to Firewall. Hit New, and specify a service called Rails which runs on port 3000. (You can specify a range of port numbers if necessary.)



While I was in there, I set up a Seaside "service" as well on port 8080.



Then go back to System Preferences and hit Network. The first thing you see should be your Network Status. If you're connected via Ethernet, you've got your IP address on the same screen. If you're connected via Airport, click TCP/IP.



Easy - even when the planets aren't in the right alignment.

2 comments:

  1. "The obvious logical choice here is"...

    go home and wait for IT to fix the development server

    :)

    ReplyDelete
  2. I am in fact in the office all alone at 8:04pm waiting to hear that the server has returned to life. You definitely have a point.

    ReplyDelete

Note: Only a member of this blog may post a comment.