Deploying Rails app to shared hosting service gives permission error
I'm trying to deploy a Rails 3.2.3 application to a shared hosting service (1and1) with Postgres as my database. I uploaded my folder to the website directory through FTP and pointed the domain to my rails folder in the control panel but when I go to the website homepage, I get "You don't have permission to access / on this server." I tried using Passenger but I'm not sure if that is needed or if it worked at all. I'm pretty new at this so step by step instructions would be great.
I'm using Mac OSX Snow Leopard, let me know if any more info is needed. Any more background articles to read would also be appreciated, I've been looking to find something that gives a good explanation of how this works but I have yet to find a good one.
First of all you need to point the virtualhost to the public directory, not the root path.
Second:I suggest you run rake assets:precompile on your local machine and load the public/assets folder to your host.
Third: look at the permissions on the files and folders you uploaded, the webserver should be able to read and execute them.
Forth: if the hosting is running apache as a webserver, you do need mod_passenger installed.
Sounds to me like you haven't deployed a Rails project before, it's really NOT for the faint of heart, and not as simple as "installing apache" and starting it up — and you're REALLY in for a treat if you try getting it to run on OSX, which configures apache very weirdly (especially on Lion, eesh)
1) Just don't bother running RoR on your Snow Leopard box over Apache, use the included rails server (rails s --debugger), you'll want the debugger available most of the time anyway.
2) Use a big end to end tutorial to get RoR running on your 1and1 box, preferably over Ubuntu (it's just easier) Classic Slicehost Tutorial
3) Once you've completed #2, let us know how you've gotten on.