How do I deploy Rails app on Mac OS X?

Discussion in 'Web Design and Development' started by TheBigDuck, Nov 5, 2009.

  1. TheBigDuck macrumors newbie

    Joined:
    Nov 5, 2009
    #1
    Hi,

    I make a simple app on my Mac.

    >rails simpleApp

    I symlink it to my Sites folder, the world can see it.

    > in Sites> ln -s ../simpleApp/public simpleApp

    I edit the httpconfd to Allow FollowSymLink

    I start the app, and go to my website, and I see "Welcome to Rails!"

    Yeah, but it's really a lie. Since clicking in "about your Applications environment" reveals

    This is bad. Very bad. Since really, nothing further would work.

    Any suggestions? How can I deploy this app without requiring the world to show up at my house and view it locally?
     
  2. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #2
    Did you restart Apache after making the change in httpd conf file?

    Better than editing Mac OS X Apache is installing MAMP which does support Ruby on Rails as per this topic (see final post), and is a great way to keep separate your web server stuff from the Mac system files, plus a GUI interface for the major setup. Just an informal suggestion.

    -jim
     
  3. Kaliemon macrumors member

    Joined:
    Apr 30, 2006
    #3
    What are you using to deploy the app?

    i.e. Mongrel, Thin, Passenger (mod_rails) or just WEBrick

    If you are not using passenger, I believe you are going to need to tell Apache to proxy to which ever server you are using, since apache doesn't run rails sites natively. (I normally use nginx instead of apache, but I presume they are similar in this aspect)

    The welcome to rails page is static html file so apache sees that as a regular file and serves it normally, but the rails side of things may not be up and running.

    Passenger also has a nice Preference plugin that you can use to set up your site.
     
  4. TheBigDuck thread starter macrumors newbie

    Joined:
    Nov 5, 2009
    #4
    Passenger

    I installed Passenger and the Preference Plug In.

    so now I get, SuperApp.local.

    Whoodeedoo... how do I serve it out to the world?
     
  5. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #5
    Don't bother.

    A) you probably have a dynamic IP address
    B) you would have to have your computer turned on 24/7
    C) your ISP probably disallows running a web server on your own computer

    Just invest in some cheap web hosting.
     
  6. Kaliemon macrumors member

    Joined:
    Apr 30, 2006
    #6
    Besides the fact this is probably true, you can use a service such as http://www.dyndns.com/ or no-ip to take care of the dynamic ip address problem, I personally use no-ip.

    Then enter the domain you choose into the Passenger preference pane instead of your .local one.

    Make sure your firewall and router open up the correct ports, generally port 80 unless you told apache to listen on a different one. This however doesn't mean that your isp has left port 80 open, and it could all work fine while you are using the same network connection but when someone tries to connect from somewhere else it might fail.

    Cheap hosting may be a better idea, but cheap and good rails hosting is hard to come by.
     

Share This Page