views:

47

answers:

1

I'm trying to get someone else's app up and running on my development laptop but I ran into a routing issue and I'm not sure how to debug it. For a particular controller/action, it just hangs and doesn't time out and there is no error message in the development log. Does anyone know how I can debug this? Thanks.

Edited per comments.

config.rb

ActionController::Routing::Routes.draw do |map|
  map.signup "/signup", :controller => "business_accounts", :action => "new"
  map.resources :beta_signups, :controller => 'public/beta_signups'
  map.root :controller => "public/pages", :action => "index"
end

For brevity, I commented out the rest of the routes and left in a couple of routes that work. The one that failed is the signup route, it simply hangs and never times out.

Here's are the relevant output from the development.log showing a route that works (root) and one that doesn't (signup)

Parameters: {"action"=>"index", "controller"=>"public/pages"}
Rendering template within layouts/public
Rendering public/pages/index
Completed in 672ms (View: 656, DB: 15) | 200 OK [http://localhost/]
  SQL (0.0ms)   SET client_min_messages TO 'panic'
  SQL (0.0ms)   SET client_min_messages TO 'notice'

Processing BusinessAccountsController#new (for 127.0.0.1 at 2010-04-22 10:01:30)
 [GET]
  Parameters: {"action"=>"new", "controller"=>"business_accounts"}

Not sure if this makes any difference but it is running on thin and bundler.

Stripped the controller down to the bare minimum and still getting the same error

class BusinessAccountsController < SSLController
 def new
   logger.debug "here"
 end
end

And I just noticed SSLController, hmm, I need to look into that.

A: 

Son of a !@%$#@%$%!$@!%, SSLController was my problem, there is no SSL setup on my laptop and the net effect is the app hanging with no error message. Changing it to ApplicationController works. Thanks @Taryn, it was your request that made me looked closer at the code, funny how I've looked at it for days and never saw it till now.

Bob