I went through the whole Subdomain/MySql/Subversion/Capistrano song and dance two months ago and finally got my Ruby on Rails blog to work with all the above. Last night I started down that road again with a new app and can’t find the light at the end of the subversion/capistrano tunnel.
-Created ‘rails newapp’ locally on my powerbook (nothing in it yet, just bare bones)
-Created subdomain newapp.mydomain.com/current/public
-MySql: newapp_production sitting on db.mydomain.com with user/password info
-Subversion: svn.mydomain.com/newapp (created after the DNS for the subdomain was working)
-locally, run ‘cap --apply-to .’ in my newapp folder and get the config/deploy.rb and lib/tasks/capistrano.rake files added nicely.
-I edit all the files listed in the DH capistrano wiki entry and the DH subversion wiki entry. ie.public/.htaccess, public/dispatch.rb, config/environment.rb, config/deploy.rb (which I copy from my successsful blog’s deploy.rb file, changing the names of the subdomains and app names.)
-in my local newapp folder, when I try to run ‘svn add config/deploy.rb lib/tasks/capistrano.rake’ I get an instant error of: " ‘config’ is not a working copy’ ?!?!? I don’t recall getting this error two months ago when I got my blog working. I’ve been following my notes from back then as well.
Continuing on with somewhat success:
-I run ‘cap setup’ locally in my newapp folder and it creates both the releases and shared folders in my newapp.mydomain.com folder on DH.
- I run ‘cap deploy’ locally and it seems to successfully create a new version at DH. In my DH’s svn/newapp/db/revs folder, it shows a new file called ‘1’, and in my DH’s newapp.mydomain.com/releases folder there is a new version folder with a long-ass number.
HOWEVER, this is where it deviates from my previous success two months ago:
In my previous blog success, the blog.mydomain.com/current folder is inaccessable via ftp (is that the symlink?) and in this newapp, I can open the ‘/current’ folder and inside is a long numbered folder that is inaccessable (same as the new folder in newapp.mydomain.com/releases folder). I can also open the newapp.mydomain.com/current/public folder and it is empty. In the other blog heirarchy, I cannot even get to the /current/public folder. What is going on? It seems like the symlink that is supposed to point the latest version folder inside releases to the ‘/current/public’ folder is missing its mark by a level. When I go to my newapp subdomain in a browser, I get served up a semi-blank page with “Index of /” and links to “Name Last Modified Size Description” I cannot add /current or /current/public or /current/long-ass’d-version-number-folder in the URL as they all return 404 not found errors.
I have gone into my domain control panel and clicked ‘edit’ on my newapp subdomain and hit the ‘edit this domain’ button to hopefully restart it (what I did with the blog whenever I updated via capistrano/subversion).
If anyone can help, I would greatly appreciate it. I can post file & log contents if needed.