Subdomain Redirect error

Hi

I got error while I try this:

My controller is :

class SessionsController < Devise::SessionsController
  def new
    super
  end
  def create
    resource = warden.authenticate!(:scope => resource_name, :recall =>
:failure)
    if resource
      subdomain_name = current_user.account.subdomain_name
      puts "==================#{subdomain_name}"
      redirect_to root_url(:subdomain => subdomain_name)

    end
  end

end

and when I try to redirect I have got

http://kausik.localhost:3000:3000/
in rails console

where it should be http://kausik.localhost:3000/

Please help to fix this

Thanks in Advance

Kausik