Hi all, I am bit stuck with subdomain_fu plugin. I want to create a new subdomain for newcomers. e.g. newband.mysite.net I set the tld_sizes: SubdomainFu.tld_sizes = {:development => 0, :test => 0, :production => 2} my routes.rb: map.resources :bands map.band_root '''', :controller => ''bands'', :action => ''show'', :conditions => { :subdomain => /.+/ } bands controller: def show @current_band = Band.find_by_subdomain(current_subdomain) end I always end up with "CANT FIND THE PAGE" error. ANy help would be most welcome. P. -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
newband.mysite.net if thats the URL u want, then tld_size should be 1. newband.localhost:3000 if thats the URL you''re developing with, then tld_size should be 0. tld_size = (number of dots in URL) - 1 (to put it crudely) On Apr 4, 3:33 am, Petr Bobek <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi all, > > I am bit stuck with subdomain_fu plugin. I want to create a new > subdomain for newcomers. e.g. newband.mysite.net > > I set the tld_sizes: > SubdomainFu.tld_sizes = {:development => 0, > :test => 0, > :production => 2} > > my routes.rb: > > map.resources :bands > map.band_root '''', :controller => ''bands'', > :action => ''show'', > :conditions => { :subdomain => /.+/ } > > bands controller: > def show > @current_band = Band.find_by_subdomain(current_subdomain) > end > > I always end up with "CANT FIND THE PAGE" error. > ANy help would be most welcome. > > P. > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thx Ram, my production server is http://rails.mysite.com so the example should be http://newband.rails.mysite.com => tld_size 2 should be fine. Could it be the problem, that I didnt flush the cache? Or is there another problem? Thx Petr Ram wrote:> newband.mysite.net > > if thats the URL u want, then tld_size should be 1. > > newband.localhost:3000 > > if thats the URL you''re developing with, then tld_size should be 0. > > tld_size = (number of dots in URL) - 1 (to put it crudely)-- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Petr, To be very honest, I dont know whether not flushing the cache might cause trouble here. I just chipped in with what little i knew :). You could check the dev/prodn log to get a better idea of whats going on and where things get stuck. You could also disable subdomains temporarily and make sure it IS indeed a subdomain problem in the first place. But most likely, the logs will be your best friends here. You will be able to trace the problem there the best. Do let us know what you find there. And ill chip in what I can if I can :). On Apr 4, 3:23 pm, Petr Bobek <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Thx Ram, > > my production server ishttp://rails.mysite.com > > so the example should behttp://newband.rails.mysite.com => tld_size 2 > should be fine. > > Could it be the problem, that I didnt flush the cache? > Or is there another problem? > > Thx Petr > > Ram wrote: > > newband.mysite.net > > > if thats the URL u want, then tld_size should be 1. > > > newband.localhost:3000 > > > if thats the URL you''re developing with, then tld_size should be 0. > > > tld_size = (number of dots in URL) - 1 (to put it crudely) > > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Here is the log file. http://gist.github.com/90190 Cant see the trouble, but I might be wrong. Thank you. P.>Ram wrote:-- 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?hl=en -~----------~----~----~----~------~----~------~--~---
The Sites controller index action seems fine. The image show action though, seems to search for images with weird IDs (submenu-li and account here). You should make sure that link is correct and the required parameters are passed on correctly. and the route too is generated correctly. You might also want to get this line checked. This is probably the line throwing the page not found error. Hope that helps. Rendering c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/templates/rescues/layout.erb (not_found) On Sat, Apr 4, 2009 at 5:27 PM, Petr Bobek <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Here is the log file. > > http://gist.github.com/90190 > Cant see the trouble, but I might be wrong. > > Thank you. > P. > > > >Ram wrote: > -- > Posted via http://www.ruby-forum.com/. > > > >-- In Sport We Trust !!! --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---