Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TheBigDuck

macrumors newbie
Original poster
Nov 5, 2009
3
0
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

The requested URL /simpleApp/public/rails/info/properties was not found on this server.

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?
 
Did you restart Apache after making the change in httpd conf file?

How can I deploy this app without requiring the world to show up at my house and view it locally?

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
 
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.
 
Passenger

Passenger also has a nice Preference plugin that you can use to set up your site.

I installed Passenger and the Preference Plug In.

so now I get, SuperApp.local.

Whoodeedoo... how do I serve it out to the world?
 
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

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.