views:

74

answers:

2

Hi, I'm trying to get RoR running on bluehost. I followed a tutorial to get started, and I thought it worked fine when the default page showed up, only to find that if I delete index.html from /public the directory listing is showing instead of the application.

I use mercurial to version control this onto the server (probably doesn't matter). When I run the local server the application shows up fine.

Is there something more I have to do to make it work, like change permissions on a directory or something like that?

A: 

You need to set your default page.

Configure this with routes.rb as seen in this article

Chris Ballance
Do you mean putting map.root :controller => "home" in routes.rb?
sharvey
I did change routes.rb to use the systax from the article (map.connect '', :controller => "home") but it still only works on the local server. Both forms seem to be equivalent.
sharvey
Firstly, the article is ancient in Rails terms and you should use `map.root` instead of `map.connect ''`Secondly, the problem isn't in your routes (you'd get a Rails routing error) nor anywhere in the app. If a Rails app received a request, it would never show a directory listing.
Leonid Shevtsov
Yeah I just found out you need to activate a rail app in the cpanel. It's still not working though, but I don't get a directory listing anymore. Just a 404, much better...
sharvey
A: 

What server does Bluehost use for Rails applications? Is it Mongrel or something else?

My guess is that you set up your app not as a Rails app but as a usual (like, PHP) site, so index.html and the directory listing show up, but the application does not receive any requests - basically the server knows nothing about it.

Leonid Shevtsov