Hi, I''m just starting with Ruby/Rails, and working through OnLamp''s "Rolling with etc". I got the cookbook app working OK, but now I want to create a little project of my own. I now realise that the url used to access a controller (say "HelloWorld" doesn''t include the "cookbook" level. So is there only one set of controllers for a given Rails server or what? (I''m using Webrick on XP) Thanks, Jim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
JimL wrote:> I''m just starting with Ruby/Rails, and working through OnLamp''s > "Rolling with etc". I got the cookbook app working OK, but now I want > to create a little project of my own. > > I now realise that the url used to access a controller (say > "HelloWorld" doesn''t include the "cookbook" level. So is there only one > set of controllers for a given Rails server or what? (I''m using > Webrick on XP)There are several ways to run multiple Rails apps. Which way you go depends on a number of factors. 1) Different ports. You can use -p <portnum> to tell webrick (or mongrel) to run on a port other than the default 3000. This is the easiest way to go during development. 2) Mapping directories. You can use Apache (or your favorite alternative) to map a /cookbook/ directory to one Rails app and /checkbook/ to another. I think mongrel is a bit touchy doing this, though it may have been fixed in the latest release. This isn''t a good solution during development, since it requires all your apps to run behind Apache and that''s annoying to work with. 3) Mapping subdomains. You can use Apache (etc) to map a subdomain to a Rails app. For example, cookbook.domain.com is one app, and checkbook.domain.com is another. Again, not a great setup for development but I''ve had good results deploying this way for production. If all you''re doing is playing around with Rails, go with (1) for now. When you''re ready to deploy things, you''ll need to explore options like (2) and (3). -- Josh Susser http://blog.hasmanythrough.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On Sun, Aug 27, 2006 at 07:55:25AM -0700, JimL wrote:> I now realise that the url used to access a controller (say > "HelloWorld" doesn''t include the "cookbook" level. So is there only one > set of controllers for a given Rails server or what? (I''m using > Webrick on XP)There is only one set of controllers per application. When running the default webrick-backed webserver, you can only run one Rails application, but that is a limitation of the dinky-toy webserver, not Rails itself. - Matt -- "I have a cat, so I know that when she digs her very sharp claws into my chest or stomach it''s really a sign of affection, but I don''t see any reason for programming languages to show affection with pain." -- Erik Naggum, comp.lang.lisp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Thanks for your replies, both J --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---