Subdomains with subdomain_fu

Hi all,

I am bit stuck with subdomain_fu plugin. I want to create a new subdomain for newcomers. e.g.

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.


if thats the URL u want, then tld_size should be 1.


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)

Thx Ram,

my production server is

so the example should be => 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:

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 :).

Here is the log file. Cant see the trouble, but I might be wrong.

Thank you. P.

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)