Mats Persson
2005-Sep-08 09:44 UTC
rails_product, vhosts, subdomains, OS X and Dreamhost == Help needed
Hi all, Being a newbie convert to the Rails world, I am hoping you all can help me get going on the right track here. I am trying to create a development/site set-up for a friend that is setting up as a freelance designer (NB! he is NOT a programmer in any way!!) He''s hosting with Dreamhost, and will remain there. His various sites/sub-domains will contain a lot of common content, but each ''site'' being specific in target, essentially promotional portfolios for different type of markets/purposes. It seems to me that the rails_product gem should work for this, and I have installed it locally already, but have these questions/problems: 1. Can a rails_product based solution be easily installed and get working on DH ? (please provide more info than a yes/no answer) 2. Can the same rails_product work with both sub-domains and full domains ? ie: sub1.site.com, sub2.site.com, www.site.com, www.othersite.com 3. Developing locally on OS X.4.2, the idea is to run the following development structure: -- Rails app stored in this central project location /Users/ <user_name>/Projects/<project_name>/<rails_app>/ -- Accessed through local virtualhosts - <rails_product_site_name> - using default Apache installation & fcgi (??) -- with symlinks (?) inside the [ /Users/<user_name>/Sites/ <rails_product_site_name>/ ] to the <rails_product_site_name>/public & log dir''s, so that multiple sites can be viewed simultaneously. (Yes, I know about different ports in Webrick, but using fcgi in apache should be better and should work automatically without needing to start Webrick for each site. Remember designer, not programmer) -- Common files, .css, .js and images should be stored in the public directory of the main site - www.site.com. -- Common features, such as Admin, Login etc, should ideally be a global location that would work for all ''sites''. Given the above scenario (point 3), is this possible ? How should I achieve this in the best, most flexible way ?? Now onto the problems I''ve come across while trying to get this working :) 4. In my trials to get this working, I''ve created the <rails_product_app> and a site for it. I''ve created a virtualhost - subdomain.domain.rails - on my local machine that points to the [ / Users/<user_name>/Sites/<vhost_name>/ ] directory. -- I have tried the included apache vhost config stuff, but can''t get it to work at all, with this problem from the development.log in the site. [Wed Sep 7 21:56:53 2005] [error] [client 127.0.0.1] FastCGI: comm with server "/Users/<user_name>/Projects/<project_name>/ <rails_app>/sites/design/public/dispatch.fcgi" aborted: idle timeout (30 sec) [Wed Sep 7 21:56:53 2005] [error] [client 127.0.0.1] FastCGI: incomplete headers (0 bytes) received from server "/Users/<user_name>/ Projects/<project_name>/<rails_app>/sites/design/public/dispatch.fcgi" -- With the [ Alias /generic /Users/<user_name>/Projects/ <project_name>/<rails_app>/public ] not commented out (as it was above), I get this 404 [Thu Sep 8 10:30:52 2005] [error] [client 127.0.0.1] File does not exist: /Users/<user_name>/Projects/<project_name>/<rails_app>/ public/index.html/ I''m kind of stuck on this simple hurdle and can''t move beyond it, and don''t really wish to develop further along this line unless the above is possible, as I have limited time available for this project. Very grateful for any help or pointers. If you need further info, please contact me off-list. Kind regards, Mats ---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -